home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: gcc-2
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| POSIX tar archive (GNU)
| default
| |
99%
| file
| POSIX tar archive (GNU), file README, mode 100644 , uid 513 , gid 24 , size 3551 , seconds 6024141501, group users
| default
| |
98%
| file
| data
| default
| |
41%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
36%
| TrID
| TAR - Tape ARchive (GNU)
| default
| |
21%
| TrID
| TAR - Tape ARchive (file)
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| GNU tar archive
| default
| |
100%
| detectItEasy
| Archive: tar
| default
| |
100%
| binwalkID
| POSIX tar archive (GNU)
| default
| |
100%
| xdgMime
| application/x-tar
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 45 41 44 4d 45 00 00 | 00 00 00 00 00 00 00 00 |README..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 35 |....1006|44 . 5|
|00000070| 31 33 20 00 20 20 20 20 | 32 34 20 00 20 20 20 20 |13 . |24 . |
|00000080| 20 20 20 33 35 35 31 20 | 20 36 30 32 34 31 34 31 | 3551 | 6024141|
|00000090| 35 30 31 20 20 20 37 33 | 36 33 00 20 30 00 00 00 |501 73|63. 0...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 00 00 00 00 00 00 00 |.ustar |........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 0a 48 65 72 65 27 73 20 | 61 6e 6f 74 68 65 72 20 |.Here's |another |
|00000210| 71 75 69 63 6b 20 68 61 | 63 6b 20 66 6f 72 20 79 |quick ha|ck for y|
|00000220| 6f 75 2e 2e 2e 0a 0a 49 | 20 72 65 63 65 6e 74 6c |ou.....I| recentl|
|00000230| 79 20 63 6f 6e 76 65 72 | 74 65 64 20 74 6f 20 4c |y conver|ted to L|
|00000240| 69 6e 75 78 2f 44 4a 47 | 50 50 20 61 20 73 6f 66 |inux/DJG|PP a sof|
|00000250| 74 77 61 72 65 20 70 72 | 6f 6a 65 63 74 20 6f 72 |tware pr|oject or|
|00000260| 69 67 69 6e 61 6c 6c 79 | 20 73 74 61 72 74 65 64 |iginally| started|
|00000270| 0a 69 6e 20 42 6f 72 6c | 61 6e 64 20 43 20 75 6e |.in Borl|and C un|
|00000280| 64 65 72 20 4d 53 2d 44 | 4f 47 3b 20 62 75 74 20 |der MS-D|OG; but |
|00000290| 74 68 65 20 70 72 6f 6a | 65 63 74 20 69 73 20 63 |the proj|ect is c|
|000002a0| 6f 6e 74 69 6e 75 6f 75 | 73 6c 79 20 67 6f 69 6e |ontinuou|sly goin|
|000002b0| 67 20 6f 6e 20 61 6e 64 | 2c 0a 77 6f 72 73 65 2c |g on and|,.worse,|
|000002c0| 20 74 68 65 20 6f 74 68 | 65 72 20 70 65 6f 70 6c | the oth|er peopl|
|000002d0| 65 20 77 6f 72 6b 69 6e | 67 20 6f 6e 20 69 74 20 |e workin|g on it |
|000002e0| 64 6f 6e 27 74 20 77 61 | 6e 74 20 74 6f 20 73 77 |don't wa|nt to sw|
|000002f0| 69 74 63 68 20 74 6f 20 | 4c 69 6e 75 78 20 3a 2d |itch to |Linux :-|
|00000300| 28 0a 53 6f 20 49 20 68 | 61 76 65 20 74 6f 20 6b |(.So I h|ave to k|
|00000310| 65 65 70 20 74 68 65 20 | 73 6f 75 72 63 65 20 74 |eep the |source t|
|00000320| 72 65 65 20 75 6e 64 65 | 72 20 44 4f 53 2e 0a 0a |ree unde|r DOS...|
|00000330| 49 20 77 61 73 20 74 69 | 72 65 64 20 6f 66 20 63 |I was ti|red of c|
|00000340| 6f 6e 74 69 6e 75 6f 75 | 73 6c 79 20 72 75 6e 6e |ontinuou|sly runn|
|00000350| 69 6e 67 20 66 72 6f 6d | 64 6f 73 2f 74 6f 64 6f |ing from|dos/todo|
|00000360| 73 20 61 6e 79 20 74 69 | 6d 65 20 49 20 68 61 64 |s any ti|me I had|
|00000370| 20 74 6f 20 63 6f 6d 70 | 69 6c 65 0a 61 20 6e 65 | to comp|ile.a ne|
|00000380| 77 20 76 65 72 73 69 6f | 6e 2c 20 61 6e 64 20 61 |w versio|n, and a|
|00000390| 74 20 74 68 65 20 73 61 | 6d 65 20 74 69 6d 65 20 |t the sa|me time |
|000003a0| 49 20 77 61 6e 74 65 64 | 20 74 6f 20 6b 65 65 70 |I wanted| to keep|
|000003b0| 20 6f 6e 6c 79 20 6f 6e | 65 20 73 6f 75 72 63 65 | only on|e source|
|000003c0| 20 74 72 65 65 2e 0a 0a | 53 6f 20 49 20 61 73 6b | tree...|So I ask|
|000003d0| 65 64 20 6d 79 73 65 6c | 66 2c 20 73 69 6e 63 65 |ed mysel|f, since|
|000003e0| 20 74 68 65 20 73 6f 75 | 72 63 65 73 20 66 6f 72 | the sou|rces for|
|000003f0| 20 74 68 69 73 20 70 72 | 6f 6a 65 63 74 20 61 72 | this pr|oject ar|
|00000400| 65 20 74 68 65 20 73 61 | 6d 65 20 75 6e 64 65 72 |e the sa|me under|
|00000410| 0a 44 4f 53 20 61 6e 64 | 20 4c 69 6e 75 78 2c 20 |.DOS and| Linux, |
|00000420| 77 68 79 20 67 63 63 20 | 63 61 6e 27 74 20 64 69 |why gcc |can't di|
|00000430| 72 65 63 74 6c 79 20 75 | 73 65 20 74 68 65 20 44 |rectly u|se the D|
|00000440| 4f 53 20 73 6f 75 72 63 | 65 73 3f 0a 49 74 20 74 |OS sourc|es?.It t|
|00000450| 75 72 6e 73 20 6f 75 74 | 20 74 68 61 74 20 69 74 |urns out| that it|
|00000460| 20 63 61 6e 2c 20 77 69 | 74 68 20 73 6f 6d 65 20 | can, wi|th some |
|00000470| 6c 69 6d 69 74 73 2e 0a | 0a 54 68 65 20 43 52 20 |limits..|.The CR |
|00000480| 28 5c 72 29 20 63 68 61 | 72 61 63 74 65 72 20 69 |(\r) cha|racter i|
|00000490| 73 20 69 67 6e 6f 72 65 | 64 20 62 79 20 67 63 63 |s ignore|d by gcc|
|000004a0| 3b 20 62 75 74 20 69 74 | 20 62 65 63 6f 6d 65 73 |; but it| becomes|
|000004b0| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 0a 77 68 65 | signifi|cant.whe|
|000004c0| 6e 20 74 68 65 20 45 4f | 4c 20 69 73 20 65 73 63 |n the EO|L is esc|
|000004d0| 61 70 65 64 3a 20 74 68 | 65 20 73 65 71 75 65 6e |aped: th|e sequen|
|000004e0| 63 65 20 62 61 63 6b 73 | 6c 61 73 68 5c 72 5c 6e |ce backs|lash\r\n|
|000004f0| 20 69 73 20 6e 6f 74 20 | 72 65 63 6f 67 6e 69 7a | is not |recogniz|
|00000500| 65 64 0a 61 73 20 61 20 | 76 61 6c 69 64 20 63 6f |ed.as a |valid co|
|00000510| 6e 74 69 6e 75 61 74 69 | 6f 6e 20 66 6f 72 20 61 |ntinuati|on for a|
|00000520| 20 6c 69 6e 65 2c 20 61 | 6e 64 20 67 69 76 65 73 | line, a|nd gives|
|00000530| 20 61 6e 20 65 72 72 6f | 72 2e 0a 0a 49 20 63 6f | an erro|r...I co|
|00000540| 75 6c 64 20 6f 66 20 63 | 6f 75 72 73 65 20 66 69 |uld of c|ourse fi|
|00000550| 6c 74 65 72 20 61 6e 64 | 20 70 72 65 70 72 6f 63 |lter and| preproc|
|00000560| 65 73 73 20 74 68 65 20 | 73 6f 75 72 63 65 20 61 |ess the |source a|
|00000570| 6e 64 20 74 68 65 6e 20 | 66 65 65 64 20 67 63 63 |nd then |feed gcc|
|00000580| 20 77 69 74 68 0a 74 68 | 65 20 2e 69 20 66 69 6c | with.th|e .i fil|
|00000590| 65 2c 20 62 75 74 20 49 | 20 64 65 63 69 64 65 64 |e, but I| decided|
|000005a0| 20 74 6f 20 74 61 6b 65 | 20 61 20 6c 6f 6f 6b 20 | to take| a look |
|000005b0| 61 74 20 74 68 65 20 63 | 70 70 20 73 6f 75 72 63 |at the c|pp sourc|
|000005c0| 65 73 2e 20 54 68 65 20 | 72 65 73 75 6c 74 0a 69 |es. The |result.i|
|000005d0| 73 20 74 68 69 73 20 73 | 6d 61 6c 6c 20 70 61 74 |s this s|mall pat|
|000005e0| 63 68 20 74 6f 20 63 63 | 63 70 2e 63 20 77 68 69 |ch to cc|cp.c whi|
|000005f0| 63 68 20 6d 61 6b 65 73 | 20 74 68 65 20 43 20 70 |ch makes| the C p|
|00000600| 72 65 70 72 6f 63 65 73 | 73 6f 72 20 61 63 63 65 |reproces|sor acce|
|00000610| 70 74 20 61 6e 79 0a 6b | 69 6e 64 20 6f 66 20 45 |pt any.k|ind of E|
|00000620| 4f 4c 20 73 65 71 75 65 | 6e 63 65 2e 0a 42 72 69 |OL seque|nce..Bri|
|00000630| 65 66 6c 79 2c 20 69 74 | 20 63 6f 6e 76 65 72 74 |efly, it| convert|
|00000640| 73 20 5c 72 5c 6e 20 74 | 6f 20 5c 6e 3c 73 70 61 |s \r\n t|o \n<spa|
|00000650| 63 65 3e 2c 20 61 6e 64 | 20 5c 72 20 61 6c 6f 6e |ce>, and| \r alon|
|00000660| 65 20 74 6f 20 5c 6e 2e | 20 5c 6e 5c 72 20 28 69 |e to \n.| \n\r (i|
|00000670| 73 20 74 68 69 73 0a 75 | 73 65 64 3f 29 20 69 73 |s this.u|sed?) is|
|00000680| 20 63 6f 6e 76 65 72 74 | 65 64 20 74 6f 20 5c 6e | convert|ed to \n|
|00000690| 5c 6e 2e 0a 0a 54 6f 20 | 61 63 74 69 76 61 74 65 |\n...To |activate|
|000006a0| 20 74 68 69 73 20 66 65 | 61 74 75 72 65 20 61 64 | this fe|ature ad|
|000006b0| 64 0a 09 2d 69 6d 73 64 | 6f 73 0a 74 6f 20 79 6f |d..-imsd|os.to yo|
|000006c0| 75 72 20 43 46 4c 41 47 | 53 20 28 66 65 65 6c 20 |ur CFLAG|S (feel |
|000006d0| 66 72 65 65 20 74 6f 20 | 75 73 65 20 61 20 62 65 |free to |use a be|
|000006e0| 74 74 65 72 20 6e 61 6d | 65 20 3a 2d 29 0a 0a 54 |tter nam|e :-)..T|
|000006f0| 68 65 20 70 61 74 63 68 | 20 69 73 20 61 67 61 69 |he patch| is agai|
|00000700| 6e 73 74 20 67 63 63 2d | 32 2e 37 2e 30 2e 0a 49 |nst gcc-|2.7.0..I|
|00000710| 20 69 6e 63 6c 75 64 65 | 64 20 61 6c 73 6f 20 61 | include|d also a|
|00000720| 20 62 69 6e 61 72 79 20 | 76 65 72 73 69 6f 6e 20 | binary |version |
|00000730| 6f 66 20 74 68 65 20 6d | 6f 64 69 66 69 65 64 20 |of the m|odified |
|00000740| 63 70 70 2e 20 54 68 69 | 73 20 69 73 20 69 6e 20 |cpp. Thi|s is in |
|00000750| 45 4c 46 0a 66 6f 72 6d | 61 74 3b 20 49 20 77 61 |ELF.form|at; I wa|
|00000760| 73 20 6e 6f 74 20 61 62 | 6c 65 20 74 6f 20 70 72 |s not ab|le to pr|
|00000770| 6f 64 75 63 65 20 61 6e | 20 61 2e 6f 75 74 20 62 |oduce an| a.out b|
|00000780| 69 6e 61 72 79 20 28 75 | 73 75 61 6c 20 74 72 6f |inary (u|sual tro|
|00000790| 75 62 6c 65 73 20 77 69 | 74 68 0a 62 65 74 61 20 |ubles wi|th.beta |
|000007a0| 73 6f 66 74 77 61 72 65 | 2e 2e 2e 29 2e 20 53 6f |software|...). So|
|000007b0| 20 69 66 20 79 6f 75 20 | 77 61 6e 74 20 74 68 65 | if you |want the|
|000007c0| 20 61 2e 6f 75 74 20 76 | 65 72 73 69 6f 6e 3a 0a | a.out v|ersion:.|
|000007d0| 09 67 65 74 20 74 68 65 | 20 67 63 63 2d 32 2e 37 |.get the| gcc-2.7|
|000007e0| 2e 30 20 73 6f 75 72 63 | 65 73 20 61 6e 64 20 75 |.0 sourc|es and u|
|000007f0| 6e 70 61 63 6b 20 74 68 | 65 6d 0a 09 65 6e 74 65 |npack th|em..ente|
|00000800| 72 20 74 68 65 20 67 63 | 63 20 64 69 72 65 63 74 |r the gc|c direct|
|00000810| 6f 72 79 20 61 6e 64 20 | 61 70 70 6c 79 20 74 68 |ory and |apply th|
|00000820| 65 20 70 61 74 63 68 20 | 28 6f 72 20 72 65 70 6c |e patch |(or repl|
|00000830| 61 63 65 0a 09 20 63 63 | 63 70 2e 63 20 77 69 74 |ace.. cc|cp.c wit|
|00000840| 68 20 74 68 65 20 6f 6e | 65 20 70 72 6f 76 69 64 |h the on|e provid|
|00000850| 65 64 20 68 65 72 65 29 | 0a 09 66 6f 6c 6c 6f 77 |ed here)|..follow|
|00000860| 20 74 68 65 20 69 6e 73 | 74 72 75 63 74 69 6f 6e | the ins|truction|
|00000870| 73 20 74 6f 20 63 6f 6e | 66 69 67 75 72 65 20 67 |s to con|figure g|
|00000880| 63 63 0a 09 6d 61 6b 65 | 20 63 70 70 09 09 2f 2a |cc..make| cpp../*|
|00000890| 20 74 68 69 73 20 69 73 | 20 65 6e 6f 75 67 68 2c | this is| enough,|
|000008a0| 20 64 6f 6e 27 74 20 6d | 61 6b 65 20 61 6c 6c 21 | don't m|ake all!|
|000008b0| 20 2a 2f 0a 0a 49 20 64 | 6f 6e 27 74 20 74 68 69 | */..I d|on't thi|
|000008c0| 6e 6b 20 6d 61 6e 79 20 | 70 65 6f 70 6c 65 20 75 |nk many |people u|
|000008d0| 73 65 20 73 68 61 72 65 | 64 20 44 4f 53 2f 4c 69 |se share|d DOS/Li|
|000008e0| 6e 75 78 20 73 6f 75 72 | 63 65 73 2c 20 62 75 74 |nux sour|ces, but|
|000008f0| 20 77 68 6f 20 6b 6e 6f | 77 73 2e 0a 50 6c 65 61 | who kno|ws..Plea|
|00000900| 73 65 20 74 65 6c 6c 20 | 6d 65 20 28 61 6e 64 20 |se tell |me (and |
|00000910| 67 63 63 20 64 65 76 65 | 6c 6f 70 65 72 73 2c 20 |gcc deve|lopers, |
|00000920| 6f 66 20 63 6f 75 72 73 | 65 29 20 69 66 20 79 6f |of cours|e) if yo|
|00000930| 75 20 66 69 6e 64 20 74 | 68 69 73 20 70 61 74 63 |u find t|his patc|
|00000940| 68 0a 75 73 65 66 75 6c | 2e 0a 0a 41 6c 62 65 72 |h.useful|...Alber|
|00000950| 74 6f 09 09 09 3c 61 2e | 76 69 67 6e 61 6e 69 40 |to...<a.|vignani@|
|00000960| 63 72 66 2e 69 74 3e 0a | 0a 00 00 00 00 00 00 00 |crf.it>.|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 67 63 63 2d 32 2e 37 2e | 30 2f 00 00 00 00 00 00 |gcc-2.7.|0/......|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 20 35 |.... 407|55 . 5|
|00000a70| 31 33 20 00 20 20 20 20 | 32 34 20 00 20 20 20 20 |13 . |24 . |
|00000a80| 20 20 20 20 20 20 30 20 | 20 36 30 32 34 31 33 36 | 0 | 6024136|
|00000a90| 35 30 34 20 20 20 37 36 | 30 37 00 20 35 00 00 00 |504 76|07. 5...|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 75 73 74 61 72 20 20 | 00 00 00 00 00 00 00 00 |.ustar |........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 67 63 63 2d 32 2e 37 2e | 30 2f 63 63 63 70 2e 63 |gcc-2.7.|0/cccp.c|
|00000c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 31 30 30 34 | 34 34 20 00 20 20 20 35 |....1004|44 . 5|
|00000c70| 31 33 20 00 20 20 20 20 | 32 34 20 00 20 20 20 20 |13 . |24 . |
|00000c80| 31 30 35 33 37 37 33 20 | 20 36 30 32 34 31 32 37 |1053773 | 6024127|
|00000c90| 32 34 32 20 20 31 31 30 | 35 35 00 20 30 00 00 00 |242 110|55. 0...|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 75 73 74 61 72 20 20 | 00 00 00 00 00 00 00 00 |.ustar |........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 75 73 65 72 73 00 00 |........|.users..|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 2f 2a 20 43 20 43 6f 6d | 70 61 74 69 62 6c 65 20 |/* C Com|patible |
|00000e10| 43 6f 6d 70 69 6c 65 72 | 20 50 72 65 70 72 6f 63 |Compiler| Preproc|
|00000e20| 65 73 73 6f 72 20 28 43 | 43 43 50 29 0a 20 20 20 |essor (C|CCP). |
|00000e30| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00000e40| 38 36 2c 20 38 37 2c 20 | 38 39 2c 20 39 32 2c 20 |86, 87, |89, 92, |
|00000e50| 39 33 2c 20 39 34 2c 20 | 31 39 39 35 20 46 72 65 |93, 94, |1995 Fre|
|00000e60| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|00000e70| 61 74 69 6f 6e 2c 20 49 | 6e 63 2e 0a 20 20 20 57 |ation, I|nc.. W|
|00000e80| 72 69 74 74 65 6e 20 62 | 79 20 50 61 75 6c 20 52 |ritten b|y Paul R|
|00000e90| 75 62 69 6e 2c 20 4a 75 | 6e 65 20 31 39 38 36 0a |ubin, Ju|ne 1986.|
|00000ea0| 20 20 20 41 64 61 70 74 | 65 64 20 74 6f 20 41 4e | Adapt|ed to AN|
|00000eb0| 53 49 20 43 2c 20 52 69 | 63 68 61 72 64 20 53 74 |SI C, Ri|chard St|
|00000ec0| 61 6c 6c 6d 61 6e 2c 20 | 4a 61 6e 20 31 39 38 37 |allman, |Jan 1987|
|00000ed0| 0a 0a 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 69 |..This p|rogram i|
|00000ee0| 73 20 66 72 65 65 20 73 | 6f 66 74 77 61 72 65 3b |s free s|oftware;|
|00000ef0| 20 79 6f 75 20 63 61 6e | 20 72 65 64 69 73 74 72 | you can| redistr|
|00000f00| 69 62 75 74 65 20 69 74 | 20 61 6e 64 2f 6f 72 20 |ibute it| and/or |
|00000f10| 6d 6f 64 69 66 79 20 69 | 74 0a 75 6e 64 65 72 20 |modify i|t.under |
|00000f20| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 74 68 65 |the term|s of the|
|00000f30| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00000f40| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 61 73 20 70 |lic Lice|nse as p|
|00000f50| 75 62 6c 69 73 68 65 64 | 20 62 79 20 74 68 65 0a |ublished| by the.|
|00000f60| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00000f70| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|00000f80| 20 76 65 72 73 69 6f 6e | 20 32 2c 20 6f 72 20 28 | version| 2, or (|
|00000f90| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 20 |at your |option) |
|00000fa0| 61 6e 79 0a 6c 61 74 65 | 72 20 76 65 72 73 69 6f |any.late|r versio|
|00000fb0| 6e 2e 0a 0a 54 68 69 73 | 20 70 72 6f 67 72 61 6d |n...This| program|
|00000fc0| 20 69 73 20 64 69 73 74 | 72 69 62 75 74 65 64 20 | is dist|ributed |
|00000fd0| 69 6e 20 74 68 65 20 68 | 6f 70 65 20 74 68 61 74 |in the h|ope that|
|00000fe0| 20 69 74 20 77 69 6c 6c | 20 62 65 20 75 73 65 66 | it will| be usef|
|00000ff0| 75 6c 2c 0a 62 75 74 20 | 57 49 54 48 4f 55 54 20 |ul,.but |WITHOUT |
|00001000| 41 4e 59 20 57 41 52 52 | 41 4e 54 59 3b 20 77 69 |ANY WARR|ANTY; wi|
|00001010| 74 68 6f 75 74 20 65 76 | 65 6e 20 74 68 65 20 69 |thout ev|en the i|
|00001020| 6d 70 6c 69 65 64 20 77 | 61 72 72 61 6e 74 79 20 |mplied w|arranty |
|00001030| 6f 66 0a 4d 45 52 43 48 | 41 4e 54 41 42 49 4c 49 |of.MERCH|ANTABILI|
|00001040| 54 59 20 6f 72 20 46 49 | 54 4e 45 53 53 20 46 4f |TY or FI|TNESS FO|
|00001050| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P|
|00001060| 55 52 50 4f 53 45 2e 20 | 20 53 65 65 20 74 68 65 |URPOSE. | See the|
|00001070| 0a 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 |.GNU Gen|eral Pub|
|00001080| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 66 6f 72 20 |lic Lice|nse for |
|00001090| 6d 6f 72 65 20 64 65 74 | 61 69 6c 73 2e 0a 0a 59 |more det|ails...Y|
|000010a0| 6f 75 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 72 |ou shoul|d have r|
|000010b0| 65 63 65 69 76 65 64 20 | 61 20 63 6f 70 79 20 6f |eceived |a copy o|
|000010c0| 66 20 74 68 65 20 47 4e | 55 20 47 65 6e 65 72 61 |f the GN|U Genera|
|000010d0| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|000010e0| 0a 61 6c 6f 6e 67 20 77 | 69 74 68 20 74 68 69 73 |.along w|ith this|
|000010f0| 20 70 72 6f 67 72 61 6d | 3b 20 69 66 20 6e 6f 74 | program|; if not|
|00001100| 2c 20 77 72 69 74 65 20 | 74 6f 20 74 68 65 20 46 |, write |to the F|
|00001110| 72 65 65 20 53 6f 66 74 | 77 61 72 65 0a 46 6f 75 |ree Soft|ware.Fou|
|00001120| 6e 64 61 74 69 6f 6e 2c | 20 35 39 20 54 65 6d 70 |ndation,| 59 Temp|
|00001130| 6c 65 20 50 6c 61 63 65 | 20 2d 20 53 75 69 74 65 |le Place| - Suite|
|00001140| 20 33 33 30 2c 0a 42 6f | 73 74 6f 6e 2c 20 4d 41 | 330,.Bo|ston, MA|
|00001150| 20 30 32 31 31 31 2d 31 | 33 30 37 2c 20 55 53 41 | 02111-1|307, USA|
|00001160| 2e 0a 0a 20 49 6e 20 6f | 74 68 65 72 20 77 6f 72 |... In o|ther wor|
|00001170| 64 73 2c 20 79 6f 75 20 | 61 72 65 20 77 65 6c 63 |ds, you |are welc|
|00001180| 6f 6d 65 20 74 6f 20 75 | 73 65 2c 20 73 68 61 72 |ome to u|se, shar|
|00001190| 65 20 61 6e 64 20 69 6d | 70 72 6f 76 65 20 74 68 |e and im|prove th|
|000011a0| 69 73 20 70 72 6f 67 72 | 61 6d 2e 0a 20 59 6f 75 |is progr|am.. You|
|000011b0| 20 61 72 65 20 66 6f 72 | 62 69 64 64 65 6e 20 74 | are for|bidden t|
|000011c0| 6f 20 66 6f 72 62 69 64 | 20 61 6e 79 6f 6e 65 20 |o forbid| anyone |
|000011d0| 65 6c 73 65 20 74 6f 20 | 75 73 65 2c 20 73 68 61 |else to |use, sha|
|000011e0| 72 65 20 61 6e 64 20 69 | 6d 70 72 6f 76 65 0a 20 |re and i|mprove. |
|000011f0| 77 68 61 74 20 79 6f 75 | 20 67 69 76 65 20 74 68 |what you| give th|
|00001200| 65 6d 2e 20 20 20 48 65 | 6c 70 20 73 74 61 6d 70 |em. He|lp stamp|
|00001210| 20 6f 75 74 20 73 6f 66 | 74 77 61 72 65 2d 68 6f | out sof|tware-ho|
|00001220| 61 72 64 69 6e 67 21 20 | 20 2a 2f 0a 0c 0a 74 79 |arding! | */...ty|
|00001230| 70 65 64 65 66 20 75 6e | 73 69 67 6e 65 64 20 63 |pedef un|signed c|
|00001240| 68 61 72 20 55 5f 43 48 | 41 52 3b 0a 0a 23 69 66 |har U_CH|AR;..#if|
|00001250| 64 65 66 20 45 4d 41 43 | 53 0a 23 64 65 66 69 6e |def EMAC|S.#defin|
|00001260| 65 20 4e 4f 5f 53 48 4f | 52 54 4e 41 4d 45 53 0a |e NO_SHO|RTNAMES.|
|00001270| 23 69 6e 63 6c 75 64 65 | 20 22 2e 2e 2f 73 72 63 |#include| "../src|
|00001280| 2f 63 6f 6e 66 69 67 2e | 68 22 0a 23 69 66 64 65 |/config.|h".#ifde|
|00001290| 66 20 6f 70 65 6e 0a 23 | 75 6e 64 65 66 20 6f 70 |f open.#|undef op|
|000012a0| 65 6e 0a 23 75 6e 64 65 | 66 20 72 65 61 64 0a 23 |en.#unde|f read.#|
|000012b0| 75 6e 64 65 66 20 77 72 | 69 74 65 0a 23 65 6e 64 |undef wr|ite.#end|
|000012c0| 69 66 20 2f 2a 20 6f 70 | 65 6e 20 2a 2f 0a 23 65 |if /* op|en */.#e|
|000012d0| 6e 64 69 66 20 2f 2a 20 | 45 4d 41 43 53 20 2a 2f |ndif /* |EMACS */|
|000012e0| 0a 0a 2f 2a 20 54 68 65 | 20 6d 61 63 72 6f 20 45 |../* The| macro E|
|000012f0| 4d 41 43 53 20 69 73 20 | 64 65 66 69 6e 65 64 20 |MACS is |defined |
|00001300| 77 68 65 6e 20 63 70 70 | 20 69 73 20 64 69 73 74 |when cpp| is dist|
|00001310| 72 69 62 75 74 65 64 20 | 61 73 20 70 61 72 74 20 |ributed |as part |
|00001320| 6f 66 20 45 6d 61 63 73 | 2c 0a 20 20 20 66 6f 72 |of Emacs|,. for|
|00001330| 20 74 68 65 20 73 61 6b | 65 20 6f 66 20 6d 61 63 | the sak|e of mac|
|00001340| 68 69 6e 65 73 20 77 69 | 74 68 20 6c 69 6d 69 74 |hines wi|th limit|
|00001350| 65 64 20 43 20 63 6f 6d | 70 69 6c 65 72 73 2e 20 |ed C com|pilers. |
|00001360| 20 2a 2f 0a 23 69 66 6e | 64 65 66 20 45 4d 41 43 | */.#ifn|def EMAC|
|00001370| 53 0a 23 69 6e 63 6c 75 | 64 65 20 22 63 6f 6e 66 |S.#inclu|de "conf|
|00001380| 69 67 2e 68 22 0a 23 65 | 6e 64 69 66 20 2f 2a 20 |ig.h".#e|ndif /* |
|00001390| 6e 6f 74 20 45 4d 41 43 | 53 20 2a 2f 0a 0a 23 69 |not EMAC|S */..#i|
|000013a0| 66 6e 64 65 66 20 53 54 | 41 4e 44 41 52 44 5f 49 |fndef ST|ANDARD_I|
|000013b0| 4e 43 4c 55 44 45 5f 44 | 49 52 0a 23 64 65 66 69 |NCLUDE_D|IR.#defi|
|000013c0| 6e 65 20 53 54 41 4e 44 | 41 52 44 5f 49 4e 43 4c |ne STAND|ARD_INCL|
|000013d0| 55 44 45 5f 44 49 52 20 | 22 2f 75 73 72 2f 69 6e |UDE_DIR |"/usr/in|
|000013e0| 63 6c 75 64 65 22 0a 23 | 65 6e 64 69 66 0a 0a 23 |clude".#|endif..#|
|000013f0| 69 66 6e 64 65 66 20 4c | 4f 43 41 4c 5f 49 4e 43 |ifndef L|OCAL_INC|
|00001400| 4c 55 44 45 5f 44 49 52 | 0a 23 64 65 66 69 6e 65 |LUDE_DIR|.#define|
|00001410| 20 4c 4f 43 41 4c 5f 49 | 4e 43 4c 55 44 45 5f 44 | LOCAL_I|NCLUDE_D|
|00001420| 49 52 20 22 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 69 |IR "/usr|/local/i|
|00001430| 6e 63 6c 75 64 65 22 0a | 23 65 6e 64 69 66 0a 0a |nclude".|#endif..|
|00001440| 23 69 66 20 30 20 2f 2a | 20 57 65 20 63 61 6e 27 |#if 0 /*| We can'|
|00001450| 74 20 67 65 74 20 70 74 | 72 64 69 66 66 5f 74 2c |t get pt|rdiff_t,|
|00001460| 20 73 6f 20 49 20 61 72 | 72 61 6e 67 65 64 20 6e | so I ar|ranged n|
|00001470| 6f 74 20 74 6f 20 6e 65 | 65 64 20 50 54 52 5f 49 |ot to ne|ed PTR_I|
|00001480| 4e 54 5f 54 59 50 45 2e | 20 20 2a 2f 0a 23 69 66 |NT_TYPE.| */.#if|
|00001490| 64 65 66 20 5f 5f 53 54 | 44 43 5f 5f 0a 23 64 65 |def __ST|DC__.#de|
|000014a0| 66 69 6e 65 20 50 54 52 | 5f 49 4e 54 5f 54 59 50 |fine PTR|_INT_TYP|
|000014b0| 45 20 70 74 72 64 69 66 | 66 5f 74 0a 23 65 6c 73 |E ptrdif|f_t.#els|
|000014c0| 65 0a 23 64 65 66 69 6e | 65 20 50 54 52 5f 49 4e |e.#defin|e PTR_IN|
|000014d0| 54 5f 54 59 50 45 20 6c | 6f 6e 67 0a 23 65 6e 64 |T_TYPE l|ong.#end|
|000014e0| 69 66 0a 23 65 6e 64 69 | 66 20 2f 2a 20 30 20 2a |if.#endi|f /* 0 *|
|000014f0| 2f 0a 0a 23 69 6e 63 6c | 75 64 65 20 22 70 63 70 |/..#incl|ude "pcp|
|00001500| 2e 68 22 0a 0a 2f 2a 20 | 42 79 20 64 65 66 61 75 |.h"../* |By defau|
|00001510| 6c 74 2c 20 63 6f 6c 6f | 6e 20 73 65 70 61 72 61 |lt, colo|n separa|
|00001520| 74 65 73 20 64 69 72 65 | 63 74 6f 72 69 65 73 20 |tes dire|ctories |
|00001530| 69 6e 20 61 20 70 61 74 | 68 2e 20 20 2a 2f 0a 23 |in a pat|h. */.#|
|00001540| 69 66 6e 64 65 66 20 50 | 41 54 48 5f 53 45 50 41 |ifndef P|ATH_SEPA|
|00001550| 52 41 54 4f 52 0a 23 64 | 65 66 69 6e 65 20 50 41 |RATOR.#d|efine PA|
|00001560| 54 48 5f 53 45 50 41 52 | 41 54 4f 52 20 27 3a 27 |TH_SEPAR|ATOR ':'|
|00001570| 0a 23 65 6e 64 69 66 0a | 0a 23 69 6e 63 6c 75 64 |.#endif.|.#includ|
|00001580| 65 20 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e <sys/t|ypes.h>.|
|00001590| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 73 74 |#include| <sys/st|
|000015a0| 61 74 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |at.h>.#i|nclude <|
|000015b0| 63 74 79 70 65 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ctype.h>|.#includ|
|000015c0| 65 20 3c 73 74 64 69 6f | 2e 68 3e 0a 23 69 6e 63 |e <stdio|.h>.#inc|
|000015d0| 6c 75 64 65 20 3c 73 69 | 67 6e 61 6c 2e 68 3e 0a |lude <si|gnal.h>.|
|000015e0| 0a 2f 2a 20 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |./* The |followin|
|000015f0| 67 20 73 79 6d 62 6f 6c | 73 20 73 68 6f 75 6c 64 |g symbol|s should|
|00001600| 20 62 65 20 61 75 74 6f | 63 6f 6e 66 69 67 75 72 | be auto|configur|
|00001610| 65 64 3a 0a 09 48 41 56 | 45 5f 46 43 4e 54 4c 5f |ed:..HAV|E_FCNTL_|
|00001620| 48 0a 09 48 41 56 45 5f | 53 54 44 4c 49 42 5f 48 |H..HAVE_|STDLIB_H|
|00001630| 0a 09 48 41 56 45 5f 53 | 59 53 5f 54 49 4d 45 5f |..HAVE_S|YS_TIME_|
|00001640| 48 0a 09 48 41 56 45 5f | 55 4e 49 53 54 44 5f 48 |H..HAVE_|UNISTD_H|
|00001650| 0a 09 53 54 44 43 5f 48 | 45 41 44 45 52 53 0a 09 |..STDC_H|EADERS..|
|00001660| 54 49 4d 45 5f 57 49 54 | 48 5f 53 59 53 5f 54 49 |TIME_WIT|H_SYS_TI|
|00001670| 4d 45 0a 20 20 20 49 6e | 20 74 68 65 20 6d 65 61 |ME. In| the mea|
|00001680| 6e 20 74 69 6d 65 2c 20 | 77 65 27 6c 6c 20 67 65 |n time, |we'll ge|
|00001690| 74 20 62 79 20 77 69 74 | 68 20 61 70 70 72 6f 78 |t by wit|h approx|
|000016a0| 69 6d 61 74 69 6f 6e 73 | 20 62 61 73 65 64 0a 20 |imations| based. |
|000016b0| 20 20 6f 6e 20 65 78 69 | 73 74 69 6e 67 20 47 43 | on exi|sting GC|
|000016c0| 43 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |C config|uration |
|000016d0| 73 79 6d 62 6f 6c 73 2e | 20 20 2a 2f 0a 0a 23 69 |symbols.| */..#i|
|000016e0| 66 64 65 66 20 50 4f 53 | 49 58 0a 23 20 69 66 6e |fdef POS|IX.# ifn|
|000016f0| 64 65 66 20 48 41 56 45 | 5f 53 54 44 4c 49 42 5f |def HAVE|_STDLIB_|
|00001700| 48 0a 23 20 64 65 66 69 | 6e 65 20 48 41 56 45 5f |H.# defi|ne HAVE_|
|00001710| 53 54 44 4c 49 42 5f 48 | 20 31 0a 23 20 65 6e 64 |STDLIB_H| 1.# end|
|00001720| 69 66 0a 23 20 69 66 6e | 64 65 66 20 48 41 56 45 |if.# ifn|def HAVE|
|00001730| 5f 55 4e 49 53 54 44 5f | 48 0a 23 20 64 65 66 69 |_UNISTD_|H.# defi|
|00001740| 6e 65 20 48 41 56 45 5f | 55 4e 49 53 54 44 5f 48 |ne HAVE_|UNISTD_H|
|00001750| 20 31 0a 23 20 65 6e 64 | 69 66 0a 23 20 69 66 6e | 1.# end|if.# ifn|
|00001760| 64 65 66 20 53 54 44 43 | 5f 48 45 41 44 45 52 53 |def STDC|_HEADERS|
|00001770| 0a 23 20 64 65 66 69 6e | 65 20 53 54 44 43 5f 48 |.# defin|e STDC_H|
|00001780| 45 41 44 45 52 53 20 31 | 0a 23 20 65 6e 64 69 66 |EADERS 1|.# endif|
|00001790| 0a 23 65 6e 64 69 66 20 | 2f 2a 20 64 65 66 69 6e |.#endif |/* defin|
|000017a0| 65 64 20 28 50 4f 53 49 | 58 29 20 2a 2f 0a 0a 23 |ed (POSI|X) */..#|
|000017b0| 69 66 20 64 65 66 69 6e | 65 64 20 28 50 4f 53 49 |if defin|ed (POSI|
|000017c0| 58 29 20 7c 7c 20 28 64 | 65 66 69 6e 65 64 20 28 |X) || (d|efined (|
|000017d0| 55 53 47 29 20 26 26 20 | 21 64 65 66 69 6e 65 64 |USG) && |!defined|
|000017e0| 20 28 56 4d 53 29 29 0a | 23 20 69 66 6e 64 65 66 | (VMS)).|# ifndef|
|000017f0| 20 48 41 56 45 5f 46 43 | 4e 54 4c 5f 48 0a 23 20 | HAVE_FC|NTL_H.# |
|00001800| 64 65 66 69 6e 65 20 48 | 41 56 45 5f 46 43 4e 54 |define H|AVE_FCNT|
|00001810| 4c 5f 48 20 31 0a 23 20 | 65 6e 64 69 66 0a 23 65 |L_H 1.# |endif.#e|
|00001820| 6e 64 69 66 0a 0a 23 69 | 66 6e 64 65 66 20 52 4c |ndif..#i|fndef RL|
|00001830| 49 4d 49 54 5f 53 54 41 | 43 4b 0a 23 20 69 6e 63 |IMIT_STA|CK.# inc|
|00001840| 6c 75 64 65 20 3c 74 69 | 6d 65 2e 68 3e 0a 23 65 |lude <ti|me.h>.#e|
|00001850| 6c 73 65 0a 23 20 69 66 | 20 54 49 4d 45 5f 57 49 |lse.# if| TIME_WI|
|00001860| 54 48 5f 53 59 53 5f 54 | 49 4d 45 0a 23 20 20 69 |TH_SYS_T|IME.# i|
|00001870| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 74 69 6d 65 |nclude <|sys/time|
|00001880| 2e 68 3e 0a 23 20 20 69 | 6e 63 6c 75 64 65 20 3c |.h>.# i|nclude <|
|00001890| 74 69 6d 65 2e 68 3e 0a | 23 20 65 6c 73 65 0a 23 |time.h>.|# else.#|
|000018a0| 20 20 69 66 20 48 41 56 | 45 5f 53 59 53 5f 54 49 | if HAV|E_SYS_TI|
|000018b0| 4d 45 5f 48 0a 23 20 20 | 20 69 6e 63 6c 75 64 65 |ME_H.# | include|
|000018c0| 20 3c 73 79 73 2f 74 69 | 6d 65 2e 68 3e 0a 23 20 | <sys/ti|me.h>.# |
|000018d0| 20 65 6c 73 65 0a 23 20 | 20 20 69 6e 63 6c 75 64 | else.# | includ|
|000018e0| 65 20 3c 74 69 6d 65 2e | 68 3e 0a 23 20 20 65 6e |e <time.|h>.# en|
|000018f0| 64 69 66 0a 23 20 65 6e | 64 69 66 0a 23 20 69 6e |dif.# en|dif.# in|
|00001900| 63 6c 75 64 65 20 3c 73 | 79 73 2f 72 65 73 6f 75 |clude <s|ys/resou|
|00001910| 72 63 65 2e 68 3e 0a 23 | 65 6e 64 69 66 0a 0a 23 |rce.h>.#|endif..#|
|00001920| 69 66 20 48 41 56 45 5f | 46 43 4e 54 4c 5f 48 0a |if HAVE_|FCNTL_H.|
|00001930| 23 20 69 6e 63 6c 75 64 | 65 20 3c 66 63 6e 74 6c |# includ|e <fcntl|
|00001940| 2e 68 3e 0a 23 65 6e 64 | 69 66 0a 0a 2f 2a 20 54 |.h>.#end|if../* T|
|00001950| 68 69 73 20 64 65 66 69 | 6e 65 73 20 22 65 72 72 |his defi|nes "err|
|00001960| 6e 6f 22 20 70 72 6f 70 | 65 72 6c 79 20 66 6f 72 |no" prop|erly for|
|00001970| 20 56 4d 53 2c 20 61 6e | 64 20 67 69 76 65 73 20 | VMS, an|d gives |
|00001980| 75 73 20 45 41 43 43 45 | 53 2e 20 2a 2f 0a 23 69 |us EACCE|S. */.#i|
|00001990| 6e 63 6c 75 64 65 20 3c | 65 72 72 6e 6f 2e 68 3e |nclude <|errno.h>|
|000019a0| 0a 0a 23 69 66 20 48 41 | 56 45 5f 53 54 44 4c 49 |..#if HA|VE_STDLI|
|000019b0| 42 5f 48 0a 23 20 69 6e | 63 6c 75 64 65 20 3c 73 |B_H.# in|clude <s|
|000019c0| 74 64 6c 69 62 2e 68 3e | 0a 23 65 6c 73 65 0a 63 |tdlib.h>|.#else.c|
|000019d0| 68 61 72 20 2a 67 65 74 | 65 6e 76 20 28 29 3b 0a |har *get|env ();.|
|000019e0| 23 65 6e 64 69 66 0a 0a | 23 69 66 20 53 54 44 43 |#endif..|#if STDC|
|000019f0| 5f 48 45 41 44 45 52 53 | 0a 23 20 69 6e 63 6c 75 |_HEADERS|.# inclu|
|00001a00| 64 65 20 3c 73 74 72 69 | 6e 67 2e 68 3e 0a 23 20 |de <stri|ng.h>.# |
|00001a10| 69 66 6e 64 65 66 20 62 | 63 6d 70 0a 23 20 64 65 |ifndef b|cmp.# de|
|00001a20| 66 69 6e 65 20 62 63 6d | 70 28 61 2c 20 62 2c 20 |fine bcm|p(a, b, |
|00001a30| 6e 29 20 6d 65 6d 63 6d | 70 20 28 61 2c 20 62 2c |n) memcm|p (a, b,|
|00001a40| 20 6e 29 0a 23 20 65 6e | 64 69 66 0a 23 20 69 66 | n).# en|dif.# if|
|00001a50| 6e 64 65 66 20 62 63 6f | 70 79 0a 23 20 64 65 66 |ndef bco|py.# def|
|00001a60| 69 6e 65 20 62 63 6f 70 | 79 28 73 2c 20 64 2c 20 |ine bcop|y(s, d, |
|00001a70| 6e 29 20 6d 65 6d 63 70 | 79 20 28 64 2c 20 73 2c |n) memcp|y (d, s,|
|00001a80| 20 6e 29 0a 23 20 65 6e | 64 69 66 0a 23 20 69 66 | n).# en|dif.# if|
|00001a90| 6e 64 65 66 20 62 7a 65 | 72 6f 0a 23 20 64 65 66 |ndef bze|ro.# def|
|00001aa0| 69 6e 65 20 62 7a 65 72 | 6f 28 64 2c 20 6e 29 20 |ine bzer|o(d, n) |
|00001ab0| 6d 65 6d 73 65 74 20 28 | 64 2c 20 30 2c 20 6e 29 |memset (|d, 0, n)|
|00001ac0| 0a 23 20 65 6e 64 69 66 | 0a 23 65 6c 73 65 20 2f |.# endif|.#else /|
|00001ad0| 2a 20 21 53 54 44 43 5f | 48 45 41 44 45 52 53 20 |* !STDC_|HEADERS |
|00001ae0| 2a 2f 0a 63 68 61 72 20 | 2a 69 6e 64 65 78 20 28 |*/.char |*index (|
|00001af0| 29 3b 0a 63 68 61 72 20 | 2a 72 69 6e 64 65 78 20 |);.char |*rindex |
|00001b00| 28 29 3b 0a 0a 23 20 69 | 66 20 21 64 65 66 69 6e |();..# i|f !defin|
|00001b10| 65 64 20 28 42 53 54 52 | 49 4e 47 29 20 26 26 20 |ed (BSTR|ING) && |
|00001b20| 28 64 65 66 69 6e 65 64 | 20 28 55 53 47 29 20 7c |(defined| (USG) ||
|00001b30| 7c 20 64 65 66 69 6e 65 | 64 20 28 56 4d 53 29 29 || define|d (VMS))|
|00001b40| 0a 0a 23 20 20 69 66 6e | 64 65 66 20 62 63 6d 70 |..# ifn|def bcmp|
|00001b50| 0a 23 20 20 64 65 66 69 | 6e 65 20 62 63 6d 70 20 |.# defi|ne bcmp |
|00001b60| 6d 79 5f 62 63 6d 70 0a | 73 74 61 74 69 63 20 69 |my_bcmp.|static i|
|00001b70| 6e 74 0a 6d 79 5f 62 63 | 6d 70 20 28 61 2c 20 62 |nt.my_bc|mp (a, b|
|00001b80| 2c 20 6e 29 0a 20 20 20 | 20 20 72 65 67 69 73 74 |, n). | regist|
|00001b90| 65 72 20 63 68 61 72 20 | 2a 61 3b 0a 20 20 20 20 |er char |*a;. |
|00001ba0| 20 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a | registe|r char *|
|00001bb0| 62 3b 0a 20 20 20 20 20 | 72 65 67 69 73 74 65 72 |b;. |register|
|00001bc0| 20 75 6e 73 69 67 6e 65 | 64 20 6e 3b 0a 7b 0a 20 | unsigne|d n;.{. |
|00001bd0| 20 20 77 68 69 6c 65 20 | 28 6e 2d 2d 20 3e 20 30 | while |(n-- > 0|
|00001be0| 29 0a 20 20 20 20 20 69 | 66 20 28 2a 61 2b 2b 20 |). i|f (*a++ |
|00001bf0| 21 3d 20 2a 62 2b 2b 29 | 0a 20 20 20 20 20 20 20 |!= *b++)|. |
|00001c00| 72 65 74 75 72 6e 20 31 | 3b 0a 0a 20 20 20 72 65 |return 1|;.. re|
|00001c10| 74 75 72 6e 20 30 3b 0a | 7d 0a 23 20 20 65 6e 64 |turn 0;.|}.# end|
|00001c20| 69 66 20 2f 2a 20 21 64 | 65 66 69 6e 65 64 20 28 |if /* !d|efined (|
|00001c30| 62 63 6d 70 29 20 2a 2f | 0a 0a 23 20 20 69 66 6e |bcmp) */|..# ifn|
|00001c40| 64 65 66 20 62 63 6f 70 | 79 0a 23 20 20 64 65 66 |def bcop|y.# def|
|00001c50| 69 6e 65 20 62 63 6f 70 | 79 20 6d 79 5f 62 63 6f |ine bcop|y my_bco|
|00001c60| 70 79 0a 73 74 61 74 69 | 63 20 76 6f 69 64 0a 6d |py.stati|c void.m|
|00001c70| 79 5f 62 63 6f 70 79 20 | 28 73 2c 20 64 2c 20 6e |y_bcopy |(s, d, n|
|00001c80| 29 0a 20 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |). r|egister |
|00001c90| 63 68 61 72 20 2a 73 3b | 0a 20 20 20 20 20 72 65 |char *s;|. re|
|00001ca0| 67 69 73 74 65 72 20 63 | 68 61 72 20 2a 64 3b 0a |gister c|har *d;.|
|00001cb0| 20 20 20 20 20 72 65 67 | 69 73 74 65 72 20 75 6e | reg|ister un|
|00001cc0| 73 69 67 6e 65 64 20 6e | 3b 0a 7b 0a 20 20 77 68 |signed n|;.{. wh|
|00001cd0| 69 6c 65 20 28 6e 2d 2d | 20 3e 20 30 29 0a 20 20 |ile (n--| > 0). |
|00001ce0| 20 20 2a 64 2b 2b 20 3d | 20 2a 73 2b 2b 3b 0a 7d | *d++ =| *s++;.}|
|00001cf0| 0a 23 20 20 65 6e 64 69 | 66 20 2f 2a 20 21 64 65 |.# endi|f /* !de|
|00001d00| 66 69 6e 65 64 20 28 62 | 63 6f 70 79 29 20 2a 2f |fined (b|copy) */|
|00001d10| 0a 0a 23 20 20 69 66 6e | 64 65 66 20 62 7a 65 72 |..# ifn|def bzer|
|00001d20| 6f 0a 23 20 20 64 65 66 | 69 6e 65 20 62 7a 65 72 |o.# def|ine bzer|
|00001d30| 6f 20 6d 79 5f 62 7a 65 | 72 6f 0a 73 74 61 74 69 |o my_bze|ro.stati|
|00001d40| 63 20 76 6f 69 64 0a 6d | 79 5f 62 7a 65 72 6f 20 |c void.m|y_bzero |
|00001d50| 28 62 2c 20 6c 65 6e 67 | 74 68 29 0a 20 20 20 20 |(b, leng|th). |
|00001d60| 20 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a | registe|r char *|
|00001d70| 62 3b 0a 20 20 20 20 20 | 72 65 67 69 73 74 65 72 |b;. |register|
|00001d80| 20 75 6e 73 69 67 6e 65 | 64 20 6c 65 6e 67 74 68 | unsigne|d length|
|00001d90| 3b 0a 7b 0a 20 20 77 68 | 69 6c 65 20 28 6c 65 6e |;.{. wh|ile (len|
|00001da0| 67 74 68 2d 2d 20 3e 20 | 30 29 0a 20 20 20 20 2a |gth-- > |0). *|
|00001db0| 62 2b 2b 20 3d 20 30 3b | 0a 7d 0a 23 20 20 65 6e |b++ = 0;|.}.# en|
|00001dc0| 64 69 66 20 2f 2a 20 21 | 64 65 66 69 6e 65 64 20 |dif /* !|defined |
|00001dd0| 28 62 7a 65 72 6f 29 20 | 2a 2f 0a 0a 23 20 65 6e |(bzero) |*/..# en|
|00001de0| 64 69 66 20 2f 2a 20 21 | 64 65 66 69 6e 65 64 20 |dif /* !|defined |
|00001df0| 28 42 53 54 52 49 4e 47 | 29 20 26 26 20 28 64 65 |(BSTRING|) && (de|
|00001e00| 66 69 6e 65 64 20 28 55 | 53 47 29 20 7c 7c 20 64 |fined (U|SG) || d|
|00001e10| 65 66 69 6e 65 64 20 28 | 56 4d 53 29 29 20 2a 2f |efined (|VMS)) */|
|00001e20| 0a 23 65 6e 64 69 66 20 | 2f 2a 20 21 20 53 54 44 |.#endif |/* ! STD|
|00001e30| 43 5f 48 45 41 44 45 52 | 53 20 2a 2f 0a 0a 23 69 |C_HEADER|S */..#i|
|00001e40| 66 20 5f 5f 47 4e 55 43 | 5f 5f 20 3c 20 32 20 7c |f __GNUC|__ < 2 ||
|00001e50| 7c 20 28 5f 5f 47 4e 55 | 43 5f 5f 20 3d 3d 20 32 || (__GNU|C__ == 2|
|00001e60| 20 26 26 20 5f 5f 47 4e | 55 43 5f 4d 49 4e 4f 52 | && __GN|UC_MINOR|
|00001e70| 5f 5f 20 3c 20 36 29 0a | 23 20 64 65 66 69 6e 65 |__ < 6).|# define|
|00001e80| 20 5f 5f 61 74 74 72 69 | 62 75 74 65 5f 5f 28 78 | __attri|bute__(x|
|00001e90| 29 0a 23 65 6e 64 69 66 | 0a 0a 23 69 66 6e 64 65 |).#endif|..#ifnde|
|00001ea0| 66 20 50 52 4f 54 4f 0a | 23 20 69 66 20 64 65 66 |f PROTO.|# if def|
|00001eb0| 69 6e 65 64 20 28 55 53 | 45 5f 50 52 4f 54 4f 54 |ined (US|E_PROTOT|
|00001ec0| 59 50 45 53 29 20 3f 20 | 55 53 45 5f 50 52 4f 54 |YPES) ? |USE_PROT|
|00001ed0| 4f 54 59 50 45 53 20 3a | 20 64 65 66 69 6e 65 64 |OTYPES :| defined|
|00001ee0| 20 28 5f 5f 53 54 44 43 | 5f 5f 29 0a 23 20 20 64 | (__STDC|__).# d|
|00001ef0| 65 66 69 6e 65 20 50 52 | 4f 54 4f 28 41 52 47 53 |efine PR|OTO(ARGS|
|00001f00| 29 20 41 52 47 53 0a 23 | 20 65 6c 73 65 0a 23 20 |) ARGS.#| else.# |
|00001f10| 20 64 65 66 69 6e 65 20 | 50 52 4f 54 4f 28 41 52 | define |PROTO(AR|
|00001f20| 47 53 29 20 28 29 0a 23 | 20 65 6e 64 69 66 0a 23 |GS) ().#| endif.#|
|00001f30| 65 6e 64 69 66 0a 0a 23 | 69 66 20 64 65 66 69 6e |endif..#|if defin|
|00001f40| 65 64 20 28 5f 5f 53 54 | 44 43 5f 5f 29 20 26 26 |ed (__ST|DC__) &&|
|00001f50| 20 64 65 66 69 6e 65 64 | 20 28 48 41 56 45 5f 56 | defined| (HAVE_V|
|00001f60| 50 52 49 4e 54 46 29 0a | 23 20 69 6e 63 6c 75 64 |PRINTF).|# includ|
|00001f70| 65 20 3c 73 74 64 61 72 | 67 2e 68 3e 0a 23 20 64 |e <stdar|g.h>.# d|
|00001f80| 65 66 69 6e 65 20 56 41 | 5f 53 54 41 52 54 28 76 |efine VA|_START(v|
|00001f90| 61 5f 6c 69 73 74 2c 20 | 76 61 72 29 20 76 61 5f |a_list, |var) va_|
|00001fa0| 73 74 61 72 74 20 28 76 | 61 5f 6c 69 73 74 2c 20 |start (v|a_list, |
|00001fb0| 76 61 72 29 0a 23 20 64 | 65 66 69 6e 65 20 50 52 |var).# d|efine PR|
|00001fc0| 49 4e 54 46 5f 41 4c 49 | 53 54 28 6d 73 67 29 20 |INTF_ALI|ST(msg) |
|00001fd0| 63 68 61 72 20 2a 6d 73 | 67 2c 20 2e 2e 2e 0a 23 |char *ms|g, ....#|
|00001fe0| 20 64 65 66 69 6e 65 20 | 50 52 49 4e 54 46 5f 44 | define |PRINTF_D|
|00001ff0| 43 4c 28 6d 73 67 29 0a | 23 20 64 65 66 69 6e 65 |CL(msg).|# define|
|00002000| 20 50 52 49 4e 54 46 5f | 50 52 4f 54 4f 28 41 52 | PRINTF_|PROTO(AR|
|00002010| 47 53 2c 20 6d 2c 20 6e | 29 20 50 52 4f 54 4f 20 |GS, m, n|) PROTO |
|00002020| 28 41 52 47 53 29 20 5f | 5f 61 74 74 72 69 62 75 |(ARGS) _|_attribu|
|00002030| 74 65 5f 5f 20 28 28 66 | 6f 72 6d 61 74 20 28 70 |te__ ((f|ormat (p|
|00002040| 72 69 6e 74 66 2c 20 6d | 2c 20 6e 29 29 29 0a 23 |rintf, m|, n))).#|
|00002050| 65 6c 73 65 0a 23 20 69 | 6e 63 6c 75 64 65 20 3c |else.# i|nclude <|
|00002060| 76 61 72 61 72 67 73 2e | 68 3e 0a 23 20 64 65 66 |varargs.|h>.# def|
|00002070| 69 6e 65 20 56 41 5f 53 | 54 41 52 54 28 76 61 5f |ine VA_S|TART(va_|
|00002080| 6c 69 73 74 2c 20 76 61 | 72 29 20 76 61 5f 73 74 |list, va|r) va_st|
|00002090| 61 72 74 20 28 76 61 5f | 6c 69 73 74 29 0a 23 20 |art (va_|list).# |
|000020a0| 64 65 66 69 6e 65 20 50 | 52 49 4e 54 46 5f 41 4c |define P|RINTF_AL|
|000020b0| 49 53 54 28 6d 73 67 29 | 20 6d 73 67 2c 20 76 61 |IST(msg)| msg, va|
|000020c0| 5f 61 6c 69 73 74 0a 23 | 20 64 65 66 69 6e 65 20 |_alist.#| define |
|000020d0| 50 52 49 4e 54 46 5f 44 | 43 4c 28 6d 73 67 29 20 |PRINTF_D|CL(msg) |
|000020e0| 63 68 61 72 20 2a 6d 73 | 67 3b 20 76 61 5f 64 63 |char *ms|g; va_dc|
|000020f0| 6c 0a 23 20 64 65 66 69 | 6e 65 20 50 52 49 4e 54 |l.# defi|ne PRINT|
|00002100| 46 5f 50 52 4f 54 4f 28 | 41 52 47 53 2c 20 6d 2c |F_PROTO(|ARGS, m,|
|00002110| 20 6e 29 20 28 29 20 5f | 5f 61 74 74 72 69 62 75 | n) () _|_attribu|
|00002120| 74 65 5f 5f 20 28 28 66 | 6f 72 6d 61 74 20 28 70 |te__ ((f|ormat (p|
|00002130| 72 69 6e 74 66 2c 20 6d | 2c 20 6e 29 29 29 0a 23 |rintf, m|, n))).#|
|00002140| 20 64 65 66 69 6e 65 20 | 76 66 70 72 69 6e 74 66 | define |vfprintf|
|00002150| 28 66 69 6c 65 2c 20 6d | 73 67 2c 20 61 72 67 73 |(file, m|sg, args|
|00002160| 29 20 5c 0a 20 20 20 20 | 7b 20 5c 0a 20 20 20 20 |) \. |{ \. |
|00002170| 20 20 63 68 61 72 20 2a | 61 30 20 3d 20 76 61 5f | char *|a0 = va_|
|00002180| 61 72 67 28 61 72 67 73 | 2c 20 63 68 61 72 20 2a |arg(args|, char *|
|00002190| 29 3b 20 5c 0a 20 20 20 | 20 20 20 63 68 61 72 20 |); \. | char |
|000021a0| 2a 61 31 20 3d 20 76 61 | 5f 61 72 67 28 61 72 67 |*a1 = va|_arg(arg|
|000021b0| 73 2c 20 63 68 61 72 20 | 2a 29 3b 20 5c 0a 20 20 |s, char |*); \. |
|000021c0| 20 20 20 20 63 68 61 72 | 20 2a 61 32 20 3d 20 76 | char| *a2 = v|
|000021d0| 61 5f 61 72 67 28 61 72 | 67 73 2c 20 63 68 61 72 |a_arg(ar|gs, char|
|000021e0| 20 2a 29 3b 20 5c 0a 20 | 20 20 20 20 20 63 68 61 | *); \. | cha|
|000021f0| 72 20 2a 61 33 20 3d 20 | 76 61 5f 61 72 67 28 61 |r *a3 = |va_arg(a|
|00002200| 72 67 73 2c 20 63 68 61 | 72 20 2a 29 3b 20 5c 0a |rgs, cha|r *); \.|
|00002210| 20 20 20 20 20 20 66 70 | 72 69 6e 74 66 20 28 66 | fp|rintf (f|
|00002220| 69 6c 65 2c 20 6d 73 67 | 2c 20 61 30 2c 20 61 31 |ile, msg|, a0, a1|
|00002230| 2c 20 61 32 2c 20 61 33 | 29 3b 20 5c 0a 20 20 20 |, a2, a3|); \. |
|00002240| 20 7d 0a 23 65 6e 64 69 | 66 0a 0a 23 64 65 66 69 | }.#endi|f..#defi|
|00002250| 6e 65 20 50 52 49 4e 54 | 46 5f 50 52 4f 54 4f 5f |ne PRINT|F_PROTO_|
|00002260| 31 28 41 52 47 53 29 20 | 50 52 49 4e 54 46 5f 50 |1(ARGS) |PRINTF_P|
|00002270| 52 4f 54 4f 28 41 52 47 | 53 2c 20 31 2c 20 32 29 |ROTO(ARG|S, 1, 2)|
|00002280| 0a 23 64 65 66 69 6e 65 | 20 50 52 49 4e 54 46 5f |.#define| PRINTF_|
|00002290| 50 52 4f 54 4f 5f 32 28 | 41 52 47 53 29 20 50 52 |PROTO_2(|ARGS) PR|
|000022a0| 49 4e 54 46 5f 50 52 4f | 54 4f 28 41 52 47 53 2c |INTF_PRO|TO(ARGS,|
|000022b0| 20 32 2c 20 33 29 0a 23 | 64 65 66 69 6e 65 20 50 | 2, 3).#|define P|
|000022c0| 52 49 4e 54 46 5f 50 52 | 4f 54 4f 5f 33 28 41 52 |RINTF_PR|OTO_3(AR|
|000022d0| 47 53 29 20 50 52 49 4e | 54 46 5f 50 52 4f 54 4f |GS) PRIN|TF_PROTO|
|000022e0| 28 41 52 47 53 2c 20 33 | 2c 20 34 29 0a 0a 23 69 |(ARGS, 3|, 4)..#i|
|000022f0| 66 20 48 41 56 45 5f 55 | 4e 49 53 54 44 5f 48 0a |f HAVE_U|NISTD_H.|
|00002300| 23 20 69 6e 63 6c 75 64 | 65 20 3c 75 6e 69 73 74 |# includ|e <unist|
|00002310| 64 2e 68 3e 0a 23 65 6e | 64 69 66 0a 0a 2f 2a 20 |d.h>.#en|dif../* |
|00002320| 56 4d 53 2d 73 70 65 63 | 69 66 69 63 20 64 65 66 |VMS-spec|ific def|
|00002330| 69 6e 69 74 69 6f 6e 73 | 20 2a 2f 0a 23 69 66 64 |initions| */.#ifd|
|00002340| 65 66 20 56 4d 53 0a 23 | 69 6e 63 6c 75 64 65 20 |ef VMS.#|include |
|00002350| 3c 64 65 73 63 72 69 70 | 2e 68 3e 0a 23 64 65 66 |<descrip|.h>.#def|
|00002360| 69 6e 65 20 4f 5f 52 44 | 4f 4e 4c 59 09 30 09 2f |ine O_RD|ONLY.0./|
|00002370| 2a 20 4f 70 65 6e 20 61 | 72 67 20 66 6f 72 20 52 |* Open a|rg for R|
|00002380| 65 61 64 2f 4f 6e 6c 79 | 20 20 2a 2f 0a 23 64 65 |ead/Only| */.#de|
|00002390| 66 69 6e 65 20 4f 5f 57 | 52 4f 4e 4c 59 09 31 09 |fine O_W|RONLY.1.|
|000023a0| 2f 2a 20 4f 70 65 6e 20 | 61 72 67 20 66 6f 72 20 |/* Open |arg for |
|000023b0| 57 72 69 74 65 2f 4f 6e | 6c 79 20 2a 2f 0a 23 64 |Write/On|ly */.#d|
|000023c0| 65 66 69 6e 65 20 72 65 | 61 64 28 66 64 2c 62 75 |efine re|ad(fd,bu|
|000023d0| 66 2c 73 69 7a 65 29 09 | 56 4d 53 5f 72 65 61 64 |f,size).|VMS_read|
|000023e0| 20 28 66 64 2c 62 75 66 | 2c 73 69 7a 65 29 0a 23 | (fd,buf|,size).#|
|000023f0| 64 65 66 69 6e 65 20 77 | 72 69 74 65 28 66 64 2c |define w|rite(fd,|
|00002400| 62 75 66 2c 73 69 7a 65 | 29 09 56 4d 53 5f 77 72 |buf,size|).VMS_wr|
|00002410| 69 74 65 20 28 66 64 2c | 62 75 66 2c 73 69 7a 65 |ite (fd,|buf,size|
|00002420| 29 0a 23 64 65 66 69 6e | 65 20 6f 70 65 6e 28 66 |).#defin|e open(f|
|00002430| 6e 61 6d 65 2c 6d 6f 64 | 65 2c 70 72 6f 74 29 09 |name,mod|e,prot).|
|00002440| 56 4d 53 5f 6f 70 65 6e | 20 28 66 6e 61 6d 65 2c |VMS_open| (fname,|
|00002450| 6d 6f 64 65 2c 70 72 6f | 74 29 0a 23 64 65 66 69 |mode,pro|t).#defi|
|00002460| 6e 65 20 66 6f 70 65 6e | 28 66 6e 61 6d 65 2c 6d |ne fopen|(fname,m|
|00002470| 6f 64 65 29 09 56 4d 53 | 5f 66 6f 70 65 6e 20 28 |ode).VMS|_fopen (|
|00002480| 66 6e 61 6d 65 2c 6d 6f | 64 65 29 0a 23 64 65 66 |fname,mo|de).#def|
|00002490| 69 6e 65 20 66 72 65 6f | 70 65 6e 28 66 6e 61 6d |ine freo|pen(fnam|
|000024a0| 65 2c 6d 6f 64 65 2c 6f | 66 69 6c 65 29 20 56 4d |e,mode,o|file) VM|
|000024b0| 53 5f 66 72 65 6f 70 65 | 6e 20 28 66 6e 61 6d 65 |S_freope|n (fname|
|000024c0| 2c 6d 6f 64 65 2c 6f 66 | 69 6c 65 29 0a 23 64 65 |,mode,of|ile).#de|
|000024d0| 66 69 6e 65 20 73 74 72 | 6e 63 61 74 28 64 73 74 |fine str|ncat(dst|
|000024e0| 2c 73 72 63 2c 63 6e 74 | 29 20 56 4d 53 5f 73 74 |,src,cnt|) VMS_st|
|000024f0| 72 6e 63 61 74 20 28 64 | 73 74 2c 73 72 63 2c 63 |rncat (d|st,src,c|
|00002500| 6e 74 29 0a 23 64 65 66 | 69 6e 65 20 66 73 74 61 |nt).#def|ine fsta|
|00002510| 74 28 66 64 2c 73 74 62 | 75 66 29 09 09 56 4d 53 |t(fd,stb|uf)..VMS|
|00002520| 5f 66 73 74 61 74 20 28 | 66 64 2c 73 74 62 75 66 |_fstat (|fd,stbuf|
|00002530| 29 0a 73 74 61 74 69 63 | 20 69 6e 74 20 56 4d 53 |).static| int VMS|
|00002540| 5f 66 73 74 61 74 20 28 | 29 2c 20 56 4d 53 5f 73 |_fstat (|), VMS_s|
|00002550| 74 61 74 20 28 29 3b 0a | 73 74 61 74 69 63 20 63 |tat ();.|static c|
|00002560| 68 61 72 20 2a 20 56 4d | 53 5f 73 74 72 6e 63 61 |har * VM|S_strnca|
|00002570| 74 20 28 29 3b 0a 73 74 | 61 74 69 63 20 69 6e 74 |t ();.st|atic int|
|00002580| 20 56 4d 53 5f 72 65 61 | 64 20 28 29 3b 0a 73 74 | VMS_rea|d ();.st|
|00002590| 61 74 69 63 20 69 6e 74 | 20 56 4d 53 5f 77 72 69 |atic int| VMS_wri|
|000025a0| 74 65 20 28 29 3b 0a 73 | 74 61 74 69 63 20 69 6e |te ();.s|tatic in|
|000025b0| 74 20 56 4d 53 5f 6f 70 | 65 6e 20 28 29 3b 0a 73 |t VMS_op|en ();.s|
|000025c0| 74 61 74 69 63 20 46 49 | 4c 45 20 2a 20 56 4d 53 |tatic FI|LE * VMS|
|000025d0| 5f 66 6f 70 65 6e 20 28 | 29 3b 0a 73 74 61 74 69 |_fopen (|);.stati|
|000025e0| 63 20 46 49 4c 45 20 2a | 20 56 4d 53 5f 66 72 65 |c FILE *| VMS_fre|
|000025f0| 6f 70 65 6e 20 28 29 3b | 0a 73 74 61 74 69 63 20 |open ();|.static |
|00002600| 76 6f 69 64 20 68 61 63 | 6b 5f 76 6d 73 5f 69 6e |void hac|k_vms_in|
|00002610| 63 6c 75 64 65 5f 73 70 | 65 63 69 66 69 63 61 74 |clude_sp|ecificat|
|00002620| 69 6f 6e 20 28 29 3b 0a | 74 79 70 65 64 65 66 20 |ion ();.|typedef |
|00002630| 73 74 72 75 63 74 20 7b | 20 75 6e 73 69 67 6e 65 |struct {| unsigne|
|00002640| 64 20 3a 31 36 2c 20 3a | 31 36 2c 20 3a 31 36 3b |d :16, :|16, :16;|
|00002650| 20 7d 20 76 6d 73 5f 69 | 6e 6f 5f 74 3b 0a 23 64 | } vms_i|no_t;.#d|
|00002660| 65 66 69 6e 65 20 69 6e | 6f 5f 74 20 76 6d 73 5f |efine in|o_t vms_|
|00002670| 69 6e 6f 5f 74 0a 23 64 | 65 66 69 6e 65 20 49 4e |ino_t.#d|efine IN|
|00002680| 43 4c 55 44 45 5f 4c 45 | 4e 5f 46 55 44 47 45 20 |CLUDE_LE|N_FUDGE |
|00002690| 31 30 09 2f 2a 20 6c 65 | 61 76 65 20 72 6f 6f 6d |10./* le|ave room|
|000026a0| 20 66 6f 72 20 56 4d 53 | 20 73 79 6e 74 61 78 20 | for VMS| syntax |
|000026b0| 63 6f 6e 76 65 72 73 69 | 6f 6e 20 2a 2f 0a 23 69 |conversi|on */.#i|
|000026c0| 66 64 65 66 20 5f 5f 47 | 4e 55 43 5f 5f 0a 23 64 |fdef __G|NUC__.#d|
|000026d0| 65 66 69 6e 65 20 42 53 | 54 52 49 4e 47 09 09 09 |efine BS|TRING...|
|000026e0| 2f 2a 20 56 4d 53 2f 47 | 43 43 20 73 75 70 70 6c |/* VMS/G|CC suppl|
|000026f0| 69 65 73 20 74 68 65 20 | 62 73 74 72 69 6e 67 20 |ies the |bstring |
|00002700| 72 6f 75 74 69 6e 65 73 | 20 2a 2f 0a 23 65 6e 64 |routines| */.#end|
|00002710| 69 66 20 2f 2a 20 5f 5f | 47 4e 55 43 5f 5f 20 2a |if /* __|GNUC__ *|
|00002720| 2f 0a 23 65 6e 64 69 66 | 20 2f 2a 20 56 4d 53 20 |/.#endif| /* VMS |
|00002730| 2a 2f 0a 0a 23 69 66 6e | 64 65 66 20 4f 5f 52 44 |*/..#ifn|def O_RD|
|00002740| 4f 4e 4c 59 0a 23 64 65 | 66 69 6e 65 20 4f 5f 52 |ONLY.#de|fine O_R|
|00002750| 44 4f 4e 4c 59 20 30 0a | 23 65 6e 64 69 66 0a 0a |DONLY 0.|#endif..|
|00002760| 23 75 6e 64 65 66 20 4d | 49 4e 0a 23 75 6e 64 65 |#undef M|IN.#unde|
|00002770| 66 20 4d 41 58 0a 23 64 | 65 66 69 6e 65 20 4d 49 |f MAX.#d|efine MI|
|00002780| 4e 28 58 2c 59 29 20 28 | 28 58 29 20 3c 20 28 59 |N(X,Y) (|(X) < (Y|
|00002790| 29 20 3f 20 28 58 29 20 | 3a 20 28 59 29 29 0a 23 |) ? (X) |: (Y)).#|
|000027a0| 64 65 66 69 6e 65 20 4d | 41 58 28 58 2c 59 29 20 |define M|AX(X,Y) |
|000027b0| 28 28 58 29 20 3e 20 28 | 59 29 20 3f 20 28 58 29 |((X) > (|Y) ? (X)|
|000027c0| 20 3a 20 28 59 29 29 0a | 0a 2f 2a 20 46 69 6e 64 | : (Y)).|./* Find|
|000027d0| 20 74 68 65 20 6c 61 72 | 67 65 73 74 20 68 6f 73 | the lar|gest hos|
|000027e0| 74 20 69 6e 74 65 67 65 | 72 20 74 79 70 65 20 61 |t intege|r type a|
|000027f0| 6e 64 20 73 65 74 20 69 | 74 73 20 73 69 7a 65 20 |nd set i|ts size |
|00002800| 61 6e 64 20 74 79 70 65 | 2e 20 20 2a 2f 0a 0a 23 |and type|. */..#|
|00002810| 69 66 6e 64 65 66 20 48 | 4f 53 54 5f 42 49 54 53 |ifndef H|OST_BITS|
|00002820| 5f 50 45 52 5f 57 49 44 | 45 5f 49 4e 54 0a 0a 23 |_PER_WID|E_INT..#|
|00002830| 69 66 20 48 4f 53 54 5f | 42 49 54 53 5f 50 45 52 |if HOST_|BITS_PER|
|00002840| 5f 4c 4f 4e 47 20 3e 20 | 48 4f 53 54 5f 42 49 54 |_LONG > |HOST_BIT|
|00002850| 53 5f 50 45 52 5f 49 4e | 54 0a 23 64 65 66 69 6e |S_PER_IN|T.#defin|
|00002860| 65 20 48 4f 53 54 5f 42 | 49 54 53 5f 50 45 52 5f |e HOST_B|ITS_PER_|
|00002870| 57 49 44 45 5f 49 4e 54 | 20 48 4f 53 54 5f 42 49 |WIDE_INT| HOST_BI|
|00002880| 54 53 5f 50 45 52 5f 4c | 4f 4e 47 0a 23 64 65 66 |TS_PER_L|ONG.#def|
|00002890| 69 6e 65 20 48 4f 53 54 | 5f 57 49 44 45 5f 49 4e |ine HOST|_WIDE_IN|
|000028a0| 54 20 6c 6f 6e 67 0a 23 | 65 6c 73 65 0a 23 64 65 |T long.#|else.#de|
|000028b0| 66 69 6e 65 20 48 4f 53 | 54 5f 42 49 54 53 5f 50 |fine HOS|T_BITS_P|
|000028c0| 45 52 5f 57 49 44 45 5f | 49 4e 54 20 48 4f 53 54 |ER_WIDE_|INT HOST|
|000028d0| 5f 42 49 54 53 5f 50 45 | 52 5f 49 4e 54 0a 23 64 |_BITS_PE|R_INT.#d|
|000028e0| 65 66 69 6e 65 20 48 4f | 53 54 5f 57 49 44 45 5f |efine HO|ST_WIDE_|
|000028f0| 49 4e 54 20 69 6e 74 0a | 23 65 6e 64 69 66 0a 0a |INT int.|#endif..|
|00002900| 23 65 6e 64 69 66 0a 0a | 23 69 66 6e 64 65 66 20 |#endif..|#ifndef |
|00002910| 53 5f 49 53 52 45 47 0a | 23 64 65 66 69 6e 65 20 |S_ISREG.|#define |
|00002920| 53 5f 49 53 52 45 47 28 | 6d 29 20 28 28 28 6d 29 |S_ISREG(|m) (((m)|
|00002930| 20 26 20 53 5f 49 46 4d | 54 29 20 3d 3d 20 53 5f | & S_IFM|T) == S_|
|00002940| 49 46 52 45 47 29 0a 23 | 65 6e 64 69 66 0a 0a 23 |IFREG).#|endif..#|
|00002950| 69 66 6e 64 65 66 20 53 | 5f 49 53 44 49 52 0a 23 |ifndef S|_ISDIR.#|
|00002960| 64 65 66 69 6e 65 20 53 | 5f 49 53 44 49 52 28 6d |define S|_ISDIR(m|
|00002970| 29 20 28 28 28 6d 29 20 | 26 20 53 5f 49 46 4d 54 |) (((m) |& S_IFMT|
|00002980| 29 20 3d 3d 20 53 5f 49 | 46 44 49 52 29 0a 23 65 |) == S_I|FDIR).#e|
|00002990| 6e 64 69 66 0a 0a 2f 2a | 20 44 65 66 69 6e 65 20 |ndif../*| Define |
|000029a0| 61 20 67 65 6e 65 72 69 | 63 20 4e 55 4c 4c 20 69 |a generi|c NULL i|
|000029b0| 66 20 6f 6e 65 20 68 61 | 73 6e 27 74 20 61 6c 72 |f one ha|sn't alr|
|000029c0| 65 61 64 79 20 62 65 65 | 6e 20 64 65 66 69 6e 65 |eady bee|n define|
|000029d0| 64 2e 20 20 2a 2f 0a 0a | 23 69 66 6e 64 65 66 20 |d. */..|#ifndef |
|000029e0| 4e 55 4c 4c 0a 23 64 65 | 66 69 6e 65 20 4e 55 4c |NULL.#de|fine NUL|
|000029f0| 4c 20 30 0a 23 65 6e 64 | 69 66 0a 0a 23 69 66 6e |L 0.#end|if..#ifn|
|00002a00| 64 65 66 20 47 45 4e 45 | 52 49 43 5f 50 54 52 0a |def GENE|RIC_PTR.|
|00002a10| 23 69 66 20 64 65 66 69 | 6e 65 64 20 28 55 53 45 |#if defi|ned (USE|
|00002a20| 5f 50 52 4f 54 4f 54 59 | 50 45 53 29 20 3f 20 55 |_PROTOTY|PES) ? U|
|00002a30| 53 45 5f 50 52 4f 54 4f | 54 59 50 45 53 20 3a 20 |SE_PROTO|TYPES : |
|00002a40| 64 65 66 69 6e 65 64 20 | 28 5f 5f 53 54 44 43 5f |defined |(__STDC_|
|00002a50| 5f 29 0a 23 64 65 66 69 | 6e 65 20 47 45 4e 45 52 |_).#defi|ne GENER|
|00002a60| 49 43 5f 50 54 52 20 76 | 6f 69 64 20 2a 0a 23 65 |IC_PTR v|oid *.#e|
|00002a70| 6c 73 65 0a 23 64 65 66 | 69 6e 65 20 47 45 4e 45 |lse.#def|ine GENE|
|00002a80| 52 49 43 5f 50 54 52 20 | 63 68 61 72 20 2a 0a 23 |RIC_PTR |char *.#|
|00002a90| 65 6e 64 69 66 0a 23 65 | 6e 64 69 66 0a 0a 23 69 |endif.#e|ndif..#i|
|00002aa0| 66 6e 64 65 66 20 4e 55 | 4c 4c 5f 50 54 52 0a 23 |fndef NU|LL_PTR.#|
|00002ab0| 64 65 66 69 6e 65 20 4e | 55 4c 4c 5f 50 54 52 20 |define N|ULL_PTR |
|00002ac0| 28 28 47 45 4e 45 52 49 | 43 5f 50 54 52 29 30 29 |((GENERI|C_PTR)0)|
|00002ad0| 0a 23 65 6e 64 69 66 0a | 0a 23 69 66 6e 64 65 66 |.#endif.|.#ifndef|
|00002ae0| 20 49 4e 43 4c 55 44 45 | 5f 4c 45 4e 5f 46 55 44 | INCLUDE|_LEN_FUD|
|00002af0| 47 45 0a 23 64 65 66 69 | 6e 65 20 49 4e 43 4c 55 |GE.#defi|ne INCLU|
|00002b00| 44 45 5f 4c 45 4e 5f 46 | 55 44 47 45 20 30 0a 23 |DE_LEN_F|UDGE 0.#|
|00002b10| 65 6e 64 69 66 0a 0a 2f | 2a 20 45 78 74 65 72 6e |endif../|* Extern|
|00002b20| 61 6c 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 2e |al decla|rations.|
|00002b30| 20 20 2a 2f 0a 0a 65 78 | 74 65 72 6e 20 63 68 61 | */..ex|tern cha|
|00002b40| 72 20 2a 76 65 72 73 69 | 6f 6e 5f 73 74 72 69 6e |r *versi|on_strin|
|00002b50| 67 3b 0a 23 69 66 6e 64 | 65 66 20 56 4d 53 0a 23 |g;.#ifnd|ef VMS.#|
|00002b60| 69 66 6e 64 65 66 20 48 | 41 56 45 5f 53 54 52 45 |ifndef H|AVE_STRE|
|00002b70| 52 52 4f 52 0a 65 78 74 | 65 72 6e 20 69 6e 74 20 |RROR.ext|ern int |
|00002b80| 73 79 73 5f 6e 65 72 72 | 3b 0a 23 69 66 20 64 65 |sys_nerr|;.#if de|
|00002b90| 66 69 6e 65 64 28 62 73 | 64 34 5f 34 29 0a 65 78 |fined(bs|d4_4).ex|
|00002ba0| 74 65 72 6e 20 63 6f 6e | 73 74 20 63 68 61 72 20 |tern con|st char |
|00002bb0| 2a 63 6f 6e 73 74 20 73 | 79 73 5f 65 72 72 6c 69 |*const s|ys_errli|
|00002bc0| 73 74 5b 5d 3b 0a 23 65 | 6c 73 65 0a 65 78 74 65 |st[];.#e|lse.exte|
|00002bd0| 72 6e 20 63 68 61 72 20 | 2a 73 79 73 5f 65 72 72 |rn char |*sys_err|
|00002be0| 6c 69 73 74 5b 5d 3b 0a | 23 65 6e 64 69 66 0a 23 |list[];.|#endif.#|
|00002bf0| 65 6c 73 65 09 2f 2a 20 | 48 41 56 45 5f 53 54 52 |else./* |HAVE_STR|
|00002c00| 45 52 52 4f 52 20 2a 2f | 0a 63 68 61 72 20 2a 73 |ERROR */|.char *s|
|00002c10| 74 72 65 72 72 6f 72 20 | 28 29 3b 0a 23 65 6e 64 |trerror |();.#end|
|00002c20| 69 66 0a 23 65 6c 73 65 | 09 2f 2a 20 56 4d 53 20 |if.#else|./* VMS |
|00002c30| 2a 2f 0a 63 68 61 72 20 | 2a 73 74 72 65 72 72 6f |*/.char |*strerro|
|00002c40| 72 20 28 69 6e 74 2c 2e | 2e 2e 29 3b 0a 23 65 6e |r (int,.|..);.#en|
|00002c50| 64 69 66 0a 69 6e 74 20 | 70 61 72 73 65 5f 65 73 |dif.int |parse_es|
|00002c60| 63 61 70 65 20 50 52 4f | 54 4f 28 28 63 68 61 72 |cape PRO|TO((char|
|00002c70| 20 2a 2a 29 29 3b 0a 48 | 4f 53 54 5f 57 49 44 45 | **));.H|OST_WIDE|
|00002c80| 5f 49 4e 54 20 70 61 72 | 73 65 5f 63 5f 65 78 70 |_INT par|se_c_exp|
|00002c90| 72 65 73 73 69 6f 6e 20 | 50 52 4f 54 4f 28 28 63 |ression |PROTO((c|
|00002ca0| 68 61 72 20 2a 29 29 3b | 0a 0a 23 69 66 6e 64 65 |har *));|..#ifnde|
|00002cb0| 66 20 65 72 72 6e 6f 0a | 65 78 74 65 72 6e 20 69 |f errno.|extern i|
|00002cc0| 6e 74 20 65 72 72 6e 6f | 3b 0a 23 65 6e 64 69 66 |nt errno|;.#endif|
|00002cd0| 0a 0c 0a 2f 2a 20 4e 61 | 6d 65 20 75 6e 64 65 72 |.../* Na|me under|
|00002ce0| 20 77 68 69 63 68 20 74 | 68 69 73 20 70 72 6f 67 | which t|his prog|
|00002cf0| 72 61 6d 20 77 61 73 20 | 69 6e 76 6f 6b 65 64 2e |ram was |invoked.|
|00002d00| 20 20 2a 2f 0a 0a 73 74 | 61 74 69 63 20 63 68 61 | */..st|atic cha|
|00002d10| 72 20 2a 70 72 6f 67 6e | 61 6d 65 3b 0a 0a 2f 2a |r *progn|ame;../*|
|00002d20| 20 4e 6f 6e 7a 65 72 6f | 20 6d 65 61 6e 73 20 75 | Nonzero| means u|
|00002d30| 73 65 20 65 78 74 72 61 | 20 64 65 66 61 75 6c 74 |se extra| default|
|00002d40| 20 69 6e 63 6c 75 64 65 | 20 64 69 72 65 63 74 6f | include| directo|
|00002d50| 72 69 65 73 20 66 6f 72 | 20 43 2b 2b 2e 20 20 2a |ries for| C++. *|
|00002d60| 2f 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 20 63 70 |/..stati|c int cp|
|00002d70| 6c 75 73 70 6c 75 73 3b | 0a 0a 2f 2a 20 4e 6f 6e |lusplus;|../* Non|
|00002d80| 7a 65 72 6f 20 6d 65 61 | 6e 73 20 68 61 6e 64 6c |zero mea|ns handl|
|00002d90| 65 20 63 70 6c 75 73 70 | 6c 75 73 20 73 74 79 6c |e cplusp|lus styl|
|00002da0| 65 20 63 6f 6d 6d 65 6e | 74 73 20 2a 2f 0a 0a 73 |e commen|ts */..s|
|00002db0| 74 61 74 69 63 20 69 6e | 74 20 63 70 6c 75 73 70 |tatic in|t cplusp|
|00002dc0| 6c 75 73 5f 63 6f 6d 6d | 65 6e 74 73 3b 0a 0a 2f |lus_comm|ents;../|
|00002dd0| 2a 20 4e 6f 6e 7a 65 72 | 6f 20 6d 65 61 6e 73 20 |* Nonzer|o means |
|00002de0| 68 61 6e 64 6c 65 20 23 | 69 6d 70 6f 72 74 2c 20 |handle #|import, |
|00002df0| 66 6f 72 20 6f 62 6a 65 | 63 74 69 76 65 20 43 2e |for obje|ctive C.|
|00002e00| 20 20 2a 2f 0a 0a 73 74 | 61 74 69 63 20 69 6e 74 | */..st|atic int|
|00002e10| 20 6f 62 6a 63 3b 0a 0a | 2f 2a 20 4e 6f 6e 7a 65 | objc;..|/* Nonze|
|00002e20| 72 6f 20 6d 65 61 6e 73 | 20 74 68 69 73 20 69 73 |ro means| this is|
|00002e30| 20 61 6e 20 61 73 73 65 | 6d 62 6c 79 20 66 69 6c | an asse|mbly fil|
|00002e40| 65 2c 20 61 6e 64 20 61 | 6c 6c 6f 77 0a 20 20 20 |e, and a|llow. |
|00002e50| 75 6e 6b 6e 6f 77 6e 20 | 64 69 72 65 63 74 69 76 |unknown |directiv|
|00002e60| 65 73 2c 20 77 68 69 63 | 68 20 63 6f 75 6c 64 20 |es, whic|h could |
|00002e70| 62 65 20 63 6f 6d 6d 65 | 6e 74 73 2e 20 20 2a 2f |be comme|nts. */|
|00002e80| 0a 0a 73 74 61 74 69 63 | 20 69 6e 74 20 6c 61 6e |..static| int lan|
|00002e90| 67 5f 61 73 6d 3b 0a 0a | 2f 2a 20 43 75 72 72 65 |g_asm;..|/* Curre|
|00002ea0| 6e 74 20 6d 61 78 69 6d | 75 6d 20 6c 65 6e 67 74 |nt maxim|um lengt|
|00002eb0| 68 20 6f 66 20 64 69 72 | 65 63 74 6f 72 79 20 6e |h of dir|ectory n|
|00002ec0| 61 6d 65 73 20 69 6e 20 | 74 68 65 20 73 65 61 72 |ames in |the sear|
|00002ed0| 63 68 20 70 61 74 68 0a | 20 20 20 66 6f 72 20 69 |ch path.| for i|
|00002ee0| 6e 63 6c 75 64 65 20 66 | 69 6c 65 73 2e 20 20 28 |nclude f|iles. (|
|00002ef0| 41 6c 74 65 72 65 64 20 | 61 73 20 77 65 20 67 65 |Altered |as we ge|
|00002f00| 74 20 6d 6f 72 65 20 6f | 66 20 74 68 65 6d 2e 29 |t more o|f them.)|
|00002f10| 20 20 2a 2f 0a 0a 73 74 | 61 74 69 63 20 69 6e 74 | */..st|atic int|
|00002f20| 20 6d 61 78 5f 69 6e 63 | 6c 75 64 65 5f 6c 65 6e | max_inc|lude_len|
|00002f30| 3b 0a 0a 2f 2a 20 4e 6f | 6e 7a 65 72 6f 20 6d 65 |;../* No|nzero me|
|00002f40| 61 6e 73 20 74 75 72 6e | 20 4e 4f 54 52 45 41 43 |ans turn| NOTREAC|
|00002f50| 48 45 44 20 69 6e 74 6f | 20 23 70 72 61 67 6d 61 |HED into| #pragma|
|00002f60| 20 4e 4f 54 52 45 41 43 | 48 45 44 20 65 74 63 20 | NOTREAC|HED etc |
|00002f70| 2a 2f 0a 0a 73 74 61 74 | 69 63 20 69 6e 74 20 66 |*/..stat|ic int f|
|00002f80| 6f 72 5f 6c 69 6e 74 20 | 3d 20 30 3b 0a 0a 2f 2a |or_lint |= 0;../*|
|00002f90| 20 4e 6f 6e 7a 65 72 6f | 20 6d 65 61 6e 73 20 63 | Nonzero| means c|
|00002fa0| 6f 70 79 20 63 6f 6d 6d | 65 6e 74 73 20 69 6e 74 |opy comm|ents int|
|00002fb0| 6f 20 74 68 65 20 6f 75 | 74 70 75 74 20 66 69 6c |o the ou|tput fil|
|00002fc0| 65 2e 20 20 2a 2f 0a 0a | 73 74 61 74 69 63 20 69 |e. */..|static i|
|00002fd0| 6e 74 20 70 75 74 5f 6f | 75 74 5f 63 6f 6d 6d 65 |nt put_o|ut_comme|
|00002fe0| 6e 74 73 20 3d 20 30 3b | 0a 0a 2f 2a 20 4e 6f 6e |nts = 0;|../* Non|
|00002ff0| 7a 65 72 6f 20 6d 65 61 | 6e 73 20 64 6f 6e 27 74 |zero mea|ns don't|
|00003000| 20 70 72 6f 63 65 73 73 | 20 74 68 65 20 41 4e 53 | process| the ANS|
|00003010| 49 20 74 72 69 67 72 61 | 70 68 20 73 65 71 75 65 |I trigra|ph seque|
|00003020| 6e 63 65 73 2e 20 20 2a | 2f 0a 0a 73 74 61 74 69 |nces. *|/..stati|
|00003030| 63 20 69 6e 74 20 6e 6f | 5f 74 72 69 67 72 61 70 |c int no|_trigrap|
|00003040| 68 73 20 3d 20 30 3b 0a | 0a 2f 2a 20 4e 6f 6e 7a |hs = 0;.|./* Nonz|
|00003050| 65 72 6f 20 6d 65 61 6e | 73 20 72 65 70 6c 61 63 |ero mean|s replac|
|00003060| 65 20 4d 53 44 4f 53 20 | 43 52 4c 46 20 73 65 71 |e MSDOS |CRLF seq|
|00003070| 75 65 6e 63 65 73 2e 20 | 2a 2f 0a 0a 73 74 61 74 |uences. |*/..stat|
|00003080| 69 63 20 69 6e 74 20 6e | 6f 5f 6d 73 64 6f 73 63 |ic int n|o_msdosc|
|00003090| 72 20 3d 20 30 3b 0a 0a | 2f 2a 20 4e 6f 6e 7a 65 |r = 0;..|/* Nonze|
|000030a0| 72 6f 20 6d 65 61 6e 73 | 20 70 72 69 6e 74 20 74 |ro means| print t|
|000030b0| 68 65 20 6e 61 6d 65 73 | 20 6f 66 20 69 6e 63 6c |he names| of incl|
|000030c0| 75 64 65 64 20 66 69 6c | 65 73 20 72 61 74 68 65 |uded fil|es rathe|
|000030d0| 72 20 74 68 61 6e 0a 20 | 20 20 74 68 65 20 70 72 |r than. | the pr|
|000030e0| 65 70 72 6f 63 65 73 73 | 65 64 20 6f 75 74 70 75 |eprocess|ed outpu|
|000030f0| 74 2e 20 20 31 20 6d 65 | 61 6e 73 20 6a 75 73 74 |t. 1 me|ans just|
|00003100| 20 74 68 65 20 23 69 6e | 63 6c 75 64 65 20 22 2e | the #in|clude ".|
|00003110| 2e 2e 22 2c 0a 20 20 20 | 32 20 6d 65 61 6e 73 20 |..",. |2 means |
|00003120| 23 69 6e 63 6c 75 64 65 | 20 3c 2e 2e 2e 3e 20 61 |#include| <...> a|
|00003130| 73 20 77 65 6c 6c 2e 20 | 20 2a 2f 0a 0a 73 74 61 |s well. | */..sta|
|00003140| 74 69 63 20 69 6e 74 20 | 70 72 69 6e 74 5f 64 65 |tic int |print_de|
|00003150| 70 73 20 3d 20 30 3b 0a | 0a 2f 2a 20 4e 6f 6e 7a |ps = 0;.|./* Nonz|
|00003160| 65 72 6f 20 69 66 20 6d | 69 73 73 69 6e 67 20 2e |ero if m|issing .|
|00003170| 68 20 66 69 6c 65 73 20 | 69 6e 20 2d 4d 20 6f 75 |h files |in -M ou|
|00003180| 74 70 75 74 20 61 72 65 | 20 61 73 73 75 6d 65 64 |tput are| assumed|
|00003190| 20 74 6f 20 62 65 20 67 | 65 6e 65 72 61 74 65 64 | to be g|enerated|
|000031a0| 0a 20 20 20 66 69 6c 65 | 73 20 61 6e 64 20 6e 6f |. file|s and no|
|000031b0| 74 20 65 72 72 6f 72 73 | 2e 20 20 2a 2f 0a 0a 73 |t errors|. */..s|
|000031c0| 74 61 74 69 63 20 69 6e | 74 20 70 72 69 6e 74 5f |tatic in|t print_|
|000031d0| 64 65 70 73 5f 6d 69 73 | 73 69 6e 67 5f 66 69 6c |deps_mis|sing_fil|
|000031e0| 65 73 20 3d 20 30 3b 0a | 0a 2f 2a 20 4e 6f 6e 7a |es = 0;.|./* Nonz|
|000031f0| 65 72 6f 20 6d 65 61 6e | 73 20 70 72 69 6e 74 20 |ero mean|s print |
|00003200| 6e 61 6d 65 73 20 6f 66 | 20 68 65 61 64 65 72 20 |names of| header |
|00003210| 66 69 6c 65 73 20 28 2d | 48 29 2e 20 20 2a 2f 0a |files (-|H). */.|
|00003220| 0a 73 74 61 74 69 63 20 | 69 6e 74 20 70 72 69 6e |.static |int prin|
|00003230| 74 5f 69 6e 63 6c 75 64 | 65 5f 6e 61 6d 65 73 20 |t_includ|e_names |
|00003240| 3d 20 30 3b 0a 0a 2f 2a | 20 4e 6f 6e 7a 65 72 6f |= 0;../*| Nonzero|
|00003250| 20 6d 65 61 6e 73 20 64 | 6f 6e 27 74 20 6f 75 74 | means d|on't out|
|00003260| 70 75 74 20 6c 69 6e 65 | 20 6e 75 6d 62 65 72 20 |put line| number |
|00003270| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 20 20 2a 2f |informat|ion. */|
|00003280| 0a 0a 73 74 61 74 69 63 | 20 69 6e 74 20 6e 6f 5f |..static| int no_|
|00003290| 6c 69 6e 65 5f 64 69 72 | 65 63 74 69 76 65 73 3b |line_dir|ectives;|
|000032a0| 0a 0a 2f 2a 20 4e 6f 6e | 7a 65 72 6f 20 6d 65 61 |../* Non|zero mea|
|000032b0| 6e 73 20 6f 75 74 70 75 | 74 20 74 68 65 20 74 65 |ns outpu|t the te|
|000032c0| 78 74 20 69 6e 20 66 61 | 69 6c 69 6e 67 20 63 6f |xt in fa|iling co|
|000032d0| 6e 64 69 74 69 6f 6e 61 | 6c 73 2c 0a 20 20 20 69 |nditiona|ls,. i|
|000032e0| 6e 73 69 64 65 20 23 66 | 61 69 6c 65 64 20 2e 2e |nside #f|ailed ..|
|000032f0| 2e 20 23 65 6e 64 66 61 | 69 6c 65 64 2e 20 20 2a |. #endfa|iled. *|
|00003300| 2f 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 20 6f 75 |/..stati|c int ou|
|00003310| 74 70 75 74 5f 63 6f 6e | 64 69 74 69 6f 6e 61 6c |tput_con|ditional|
|00003320| 73 3b 0a 0a 2f 2a 20 64 | 75 6d 70 5f 6f 6e 6c 79 |s;../* d|ump_only|
|00003330| 20 6d 65 61 6e 73 20 69 | 6e 68 69 62 69 74 20 6f | means i|nhibit o|
|00003340| 75 74 70 75 74 20 6f 66 | 20 74 68 65 20 70 72 65 |utput of| the pre|
|00003350| 70 72 6f 63 65 73 73 65 | 64 20 74 65 78 74 0a 20 |processe|d text. |
|00003360| 20 20 20 20 20 20 20 20 | 20 20 20 20 61 6e 64 20 | | and |
|00003370| 69 6e 73 74 65 61 64 20 | 6f 75 74 70 75 74 20 74 |instead |output t|
|00003380| 68 65 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6f |he defin|itions o|
|00003390| 66 20 61 6c 6c 20 75 73 | 65 72 2d 64 65 66 69 6e |f all us|er-defin|
|000033a0| 65 64 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed. | |
|000033b0| 6d 61 63 72 6f 73 20 69 | 6e 20 61 20 66 6f 72 6d |macros i|n a form|
|000033c0| 20 73 75 69 74 61 62 6c | 65 20 66 6f 72 20 75 73 | suitabl|e for us|
|000033d0| 65 20 61 73 20 69 6e 70 | 75 74 20 74 6f 20 63 63 |e as inp|ut to cc|
|000033e0| 63 70 2e 0a 20 20 20 64 | 75 6d 70 5f 6e 61 6d 65 |cp.. d|ump_name|
|000033f0| 73 20 6d 65 61 6e 73 20 | 70 61 73 73 20 23 64 65 |s means |pass #de|
|00003400| 66 69 6e 65 20 61 6e 64 | 20 74 68 65 20 6d 61 63 |fine and| the mac|
|00003410| 72 6f 20 6e 61 6d 65 20 | 74 68 72 6f 75 67 68 20 |ro name |through |
|00003420| 74 6f 20 6f 75 74 70 75 | 74 2e 0a 20 20 20 64 75 |to outpu|t.. du|
|00003430| 6d 70 5f 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6d |mp_defin|itions m|
|00003440| 65 61 6e 73 20 70 61 73 | 73 20 74 68 65 20 77 68 |eans pas|s the wh|
|00003450| 6f 6c 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 28 |ole defi|nition (|
|00003460| 70 6c 75 73 20 23 64 65 | 66 69 6e 65 29 20 74 68 |plus #de|fine) th|
|00003470| 72 6f 75 67 68 0a 2a 2f | 0a 0a 73 74 61 74 69 63 |rough.*/|..static|
|00003480| 20 65 6e 75 6d 20 7b 64 | 75 6d 70 5f 6e 6f 6e 65 | enum {d|ump_none|
|00003490| 2c 20 64 75 6d 70 5f 6f | 6e 6c 79 2c 20 64 75 6d |, dump_o|nly, dum|
|000034a0| 70 5f 6e 61 6d 65 73 2c | 20 64 75 6d 70 5f 64 65 |p_names,| dump_de|
|000034b0| 66 69 6e 69 74 69 6f 6e | 73 7d 0a 20 20 20 20 20 |finition|s}. |
|000034c0| 64 75 6d 70 5f 6d 61 63 | 72 6f 73 20 3d 20 64 75 |dump_mac|ros = du|
|000034d0| 6d 70 5f 6e 6f 6e 65 3b | 0a 0a 2f 2a 20 4e 6f 6e |mp_none;|../* Non|
|000034e0| 7a 65 72 6f 20 6d 65 61 | 6e 73 20 70 61 73 73 20 |zero mea|ns pass |
|000034f0| 61 6c 6c 20 23 64 65 66 | 69 6e 65 20 61 6e 64 20 |all #def|ine and |
|00003500| 23 75 6e 64 65 66 20 64 | 69 72 65 63 74 69 76 65 |#undef d|irective|
|00003510| 73 20 77 68 69 63 68 20 | 77 65 20 61 63 74 75 61 |s which |we actua|
|00003520| 6c 6c 79 0a 20 20 20 70 | 72 6f 63 65 73 73 20 74 |lly. p|rocess t|
|00003530| 68 72 6f 75 67 68 20 74 | 6f 20 74 68 65 20 6f 75 |hrough t|o the ou|
|00003540| 74 70 75 74 20 73 74 72 | 65 61 6d 2e 20 20 54 68 |tput str|eam. Th|
|00003550| 69 73 20 66 65 61 74 75 | 72 65 20 69 73 20 75 73 |is featu|re is us|
|00003560| 65 64 20 70 72 69 6d 61 | 72 69 6c 79 0a 20 20 20 |ed prima|rily. |
|00003570| 74 6f 20 61 6c 6c 6f 77 | 20 63 63 31 20 74 6f 20 |to allow| cc1 to |
|00003580| 72 65 63 6f 72 64 20 74 | 68 65 20 23 64 65 66 69 |record t|he #defi|
|00003590| 6e 65 73 20 61 6e 64 20 | 23 75 6e 64 65 66 73 20 |nes and |#undefs |
|000035a0| 66 6f 72 20 74 68 65 20 | 73 61 6b 65 20 6f 66 0a |for the |sake of.|
|000035b0| 20 20 20 64 65 62 75 67 | 67 65 72 73 20 77 68 69 | debug|gers whi|
|000035c0| 63 68 20 75 6e 64 65 72 | 73 74 61 6e 64 20 61 62 |ch under|stand ab|
|000035d0| 6f 75 74 20 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |out prep|rocessor|
|000035e0| 20 6d 61 63 72 6f 73 2c | 20 62 75 74 20 69 74 20 | macros,| but it |
|000035f0| 6d 61 79 0a 20 20 20 61 | 6c 73 6f 20 62 65 20 75 |may. a|lso be u|
|00003600| 73 65 66 75 6c 20 77 69 | 74 68 20 2d 45 20 74 6f |seful wi|th -E to|
|00003610| 20 66 69 67 75 72 65 20 | 6f 75 74 20 68 6f 77 20 | figure |out how |
|00003620| 73 79 6d 62 6f 6c 73 20 | 61 72 65 20 64 65 66 69 |symbols |are defi|
|00003630| 6e 65 64 2c 20 61 6e 64 | 0a 20 20 20 77 68 65 72 |ned, and|. wher|
|00003640| 65 20 74 68 65 79 20 61 | 72 65 20 64 65 66 69 6e |e they a|re defin|
|00003650| 65 64 2e 20 20 2a 2f 0a | 73 74 61 74 69 63 20 69 |ed. */.|static i|
|00003660| 6e 74 20 64 65 62 75 67 | 5f 6f 75 74 70 75 74 20 |nt debug|_output |
|00003670| 3d 20 30 3b 0a 0a 2f 2a | 20 4e 6f 6e 7a 65 72 6f |= 0;../*| Nonzero|
|00003680| 20 69 6e 64 69 63 61 74 | 65 73 20 73 70 65 63 69 | indicat|es speci|
|00003690| 61 6c 20 70 72 6f 63 65 | 73 73 69 6e 67 20 75 73 |al proce|ssing us|
|000036a0| 65 64 20 62 79 20 74 68 | 65 20 70 63 70 20 70 72 |ed by th|e pcp pr|
|000036b0| 6f 67 72 61 6d 2e 20 20 | 54 68 65 0a 20 20 20 73 |ogram. |The. s|
|000036c0| 70 65 63 69 61 6c 20 65 | 66 66 65 63 74 73 20 6f |pecial e|ffects o|
|000036d0| 66 20 74 68 69 73 20 6d | 6f 64 65 20 61 72 65 3a |f this m|ode are:|
|000036e0| 20 0a 20 20 20 20 20 0a | 20 20 20 20 20 49 6e 68 | . .| Inh|
|000036f0| 69 62 69 74 20 61 6c 6c | 20 6d 61 63 72 6f 20 65 |ibit all| macro e|
|00003700| 78 70 61 6e 73 69 6f 6e | 2c 20 65 78 63 65 70 74 |xpansion|, except|
|00003710| 20 74 68 6f 73 65 20 69 | 6e 73 69 64 65 20 23 69 | those i|nside #i|
|00003720| 66 20 64 69 72 65 63 74 | 69 76 65 73 2e 0a 0a 20 |f direct|ives... |
|00003730| 20 20 20 20 50 72 6f 63 | 65 73 73 20 23 64 65 66 | Proc|ess #def|
|00003740| 69 6e 65 20 64 69 72 65 | 63 74 69 76 65 73 20 6e |ine dire|ctives n|
|00003750| 6f 72 6d 61 6c 6c 79 2c | 20 61 6e 64 20 6f 75 74 |ormally,| and out|
|00003760| 70 75 74 20 74 68 65 69 | 72 20 63 6f 6e 74 65 6e |put thei|r conten|
|00003770| 74 73 20 0a 20 20 20 20 | 20 74 6f 20 74 68 65 20 |ts . | to the |
|00003780| 6f 75 74 70 75 74 20 66 | 69 6c 65 2e 0a 0a 20 20 |output f|ile... |
|00003790| 20 20 20 4f 75 74 70 75 | 74 20 70 72 65 63 6f 6e | Outpu|t precon|
|000037a0| 64 69 74 69 6f 6e 73 20 | 74 6f 20 70 63 70 5f 6f |ditions |to pcp_o|
|000037b0| 75 74 66 69 6c 65 20 69 | 6e 64 69 63 61 74 69 6e |utfile i|ndicatin|
|000037c0| 67 20 61 6c 6c 20 74 68 | 65 20 72 65 6c 65 76 61 |g all th|e releva|
|000037d0| 6e 74 0a 20 20 20 20 20 | 70 72 65 63 6f 6e 64 69 |nt. |precondi|
|000037e0| 74 69 6f 6e 73 20 66 6f | 72 20 75 73 65 20 6f 66 |tions fo|r use of|
|000037f0| 20 74 68 69 73 20 66 69 | 6c 65 20 69 6e 20 61 20 | this fi|le in a |
|00003800| 6c 61 74 65 72 20 63 70 | 70 20 72 75 6e 2e 0a 2a |later cp|p run..*|
|00003810| 2f 0a 73 74 61 74 69 63 | 20 46 49 4c 45 20 2a 70 |/.static| FILE *p|
|00003820| 63 70 5f 6f 75 74 66 69 | 6c 65 3b 0a 0a 2f 2a 20 |cp_outfi|le;../* |
|00003830| 4e 6f 6e 7a 65 72 6f 20 | 6d 65 61 6e 73 20 77 65 |Nonzero |means we|
|00003840| 20 61 72 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 | are ins|ide an I|
|00003850| 46 20 64 75 72 69 6e 67 | 20 61 20 2d 70 63 70 20 |F during| a -pcp |
|00003860| 72 75 6e 2e 20 20 49 6e | 20 74 68 69 73 20 6d 6f |run. In| this mo|
|00003870| 64 65 0a 20 20 20 6d 61 | 63 72 6f 20 65 78 70 61 |de. ma|cro expa|
|00003880| 6e 73 69 6f 6e 20 69 73 | 20 64 6f 6e 65 2c 20 61 |nsion is| done, a|
|00003890| 6e 64 20 70 72 65 63 6f | 6e 64 69 74 69 6f 6e 73 |nd preco|nditions|
|000038a0| 20 61 72 65 20 6f 75 74 | 70 75 74 20 66 6f 72 20 | are out|put for |
|000038b0| 61 6c 6c 20 6d 61 63 72 | 6f 0a 20 20 20 75 73 65 |all macr|o. use|
|000038c0| 73 20 72 65 71 75 69 72 | 69 6e 67 20 74 68 65 6d |s requir|ing them|
|000038d0| 2e 20 2a 2f 0a 73 74 61 | 74 69 63 20 69 6e 74 20 |. */.sta|tic int |
|000038e0| 70 63 70 5f 69 6e 73 69 | 64 65 5f 69 66 3b 0a 0a |pcp_insi|de_if;..|
|000038f0| 2f 2a 20 4e 6f 6e 7a 65 | 72 6f 20 6d 65 61 6e 73 |/* Nonze|ro means|
|00003900| 20 6e 65 76 65 72 20 74 | 6f 20 69 6e 63 6c 75 64 | never t|o includ|
|00003910| 65 20 70 72 65 63 6f 6d | 70 69 6c 65 64 20 66 69 |e precom|piled fi|
|00003920| 6c 65 73 2e 0a 20 20 20 | 54 68 69 73 20 69 73 20 |les.. |This is |
|00003930| 31 20 73 69 6e 63 65 20 | 74 68 65 72 65 27 73 20 |1 since |there's |
|00003940| 6e 6f 20 77 61 79 20 6e | 6f 77 20 74 6f 20 6d 61 |no way n|ow to ma|
|00003950| 6b 65 20 70 72 65 63 6f | 6d 70 69 6c 65 64 20 66 |ke preco|mpiled f|
|00003960| 69 6c 65 73 2c 0a 20 20 | 20 73 6f 20 69 74 27 73 |iles,. | so it's|
|00003970| 20 6e 6f 74 20 77 6f 72 | 74 68 20 74 65 73 74 69 | not wor|th testi|
|00003980| 6e 67 20 66 6f 72 20 74 | 68 65 6d 2e 20 20 2a 2f |ng for t|hem. */|
|00003990| 0a 73 74 61 74 69 63 20 | 69 6e 74 20 6e 6f 5f 70 |.static |int no_p|
|000039a0| 72 65 63 6f 6d 70 20 3d | 20 31 3b 0a 0a 2f 2a 20 |recomp =| 1;../* |
|000039b0| 4e 6f 6e 7a 65 72 6f 20 | 6d 65 61 6e 73 20 67 69 |Nonzero |means gi|
|000039c0| 76 65 20 61 6c 6c 20 74 | 68 65 20 65 72 72 6f 72 |ve all t|he error|
|000039d0| 20 6d 65 73 73 61 67 65 | 73 20 74 68 65 20 41 4e | message|s the AN|
|000039e0| 53 49 20 73 74 61 6e 64 | 61 72 64 20 72 65 71 75 |SI stand|ard requ|
|000039f0| 69 72 65 73 2e 20 20 2a | 2f 0a 0a 69 6e 74 20 70 |ires. *|/..int p|
|00003a00| 65 64 61 6e 74 69 63 3b | 0a 0a 2f 2a 20 4e 6f 6e |edantic;|../* Non|
|00003a10| 7a 65 72 6f 20 6d 65 61 | 6e 73 20 74 72 79 20 74 |zero mea|ns try t|
|00003a20| 6f 20 6d 61 6b 65 20 66 | 61 69 6c 75 72 65 20 74 |o make f|ailure t|
|00003a30| 6f 20 66 69 74 20 41 4e | 53 49 20 43 20 61 6e 20 |o fit AN|SI C an |
|00003a40| 65 72 72 6f 72 2e 20 20 | 2a 2f 0a 0a 73 74 61 74 |error. |*/..stat|
|00003a50| 69 63 20 69 6e 74 20 70 | 65 64 61 6e 74 69 63 5f |ic int p|edantic_|
|00003a60| 65 72 72 6f 72 73 3b 0a | 0a 2f 2a 20 4e 6f 6e 7a |errors;.|./* Nonz|
|00003a70| 65 72 6f 20 6d 65 61 6e | 73 20 64 6f 6e 27 74 20 |ero mean|s don't |
|00003a80| 70 72 69 6e 74 20 77 61 | 72 6e 69 6e 67 20 6d 65 |print wa|rning me|
|00003a90| 73 73 61 67 65 73 2e 20 | 20 2d 77 2e 20 20 2a 2f |ssages. | -w. */|
|00003aa0| 0a 0a 73 74 61 74 69 63 | 20 69 6e 74 20 69 6e 68 |..static| int inh|
|00003ab0| 69 62 69 74 5f 77 61 72 | 6e 69 6e 67 73 20 3d 20 |ibit_war|nings = |
|00003ac0| 30 3b 0a 0a 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 6d |0;../* N|onzero m|
|00003ad0| 65 61 6e 73 20 77 61 72 | 6e 20 69 66 20 73 6c 61 |eans war|n if sla|
|00003ae0| 73 68 2d 73 74 61 72 20 | 61 70 70 65 61 72 73 20 |sh-star |appears |
|00003af0| 69 6e 20 61 20 63 6f 6d | 6d 65 6e 74 2e 20 20 2a |in a com|ment. *|
|00003b00| 2f 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 20 77 61 |/..stati|c int wa|
|00003b10| 72 6e 5f 63 6f 6d 6d 65 | 6e 74 73 3b 0a 0a 2f 2a |rn_comme|nts;../*|
|00003b20| 20 4e 6f 6e 7a 65 72 6f | 20 6d 65 61 6e 73 20 77 | Nonzero| means w|
|00003b30| 61 72 6e 20 69 66 20 61 | 20 6d 61 63 72 6f 20 61 |arn if a| macro a|
|00003b40| 72 67 75 6d 65 6e 74 20 | 69 73 20 28 6f 72 20 77 |rgument |is (or w|
|00003b50| 6f 75 6c 64 20 62 65 29 | 0a 20 20 20 73 74 72 69 |ould be)|. stri|
|00003b60| 6e 67 69 66 69 65 64 20 | 77 69 74 68 20 2d 74 72 |ngified |with -tr|
|00003b70| 61 64 69 74 69 6f 6e 61 | 6c 2e 20 20 2a 2f 0a 0a |aditiona|l. */..|
|00003b80| 73 74 61 74 69 63 20 69 | 6e 74 20 77 61 72 6e 5f |static i|nt warn_|
|00003b90| 73 74 72 69 6e 67 69 66 | 79 3b 0a 0a 2f 2a 20 4e |stringif|y;../* N|
|00003ba0| 6f 6e 7a 65 72 6f 20 6d | 65 61 6e 73 20 77 61 72 |onzero m|eans war|
|00003bb0| 6e 20 69 66 20 74 68 65 | 72 65 20 61 72 65 20 61 |n if the|re are a|
|00003bc0| 6e 79 20 74 72 69 67 72 | 61 70 68 73 2e 20 20 2a |ny trigr|aphs. *|
|00003bd0| 2f 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 20 77 61 |/..stati|c int wa|
|00003be0| 72 6e 5f 74 72 69 67 72 | 61 70 68 73 3b 0a 0a 2f |rn_trigr|aphs;../|
|00003bf0| 2a 20 4e 6f 6e 7a 65 72 | 6f 20 6d 65 61 6e 73 20 |* Nonzer|o means |
|00003c00| 77 61 72 6e 20 69 66 20 | 23 69 6d 70 6f 72 74 20 |warn if |#import |
|00003c10| 69 73 20 75 73 65 64 2e | 20 20 2a 2f 0a 0a 73 74 |is used.| */..st|
|00003c20| 61 74 69 63 20 69 6e 74 | 20 77 61 72 6e 5f 69 6d |atic int| warn_im|
|00003c30| 70 6f 72 74 20 3d 20 31 | 3b 0a 0a 2f 2a 20 4e 6f |port = 1|;../* No|
|00003c40| 6e 7a 65 72 6f 20 6d 65 | 61 6e 73 20 74 75 72 6e |nzero me|ans turn|
|00003c50| 20 77 61 72 6e 69 6e 67 | 73 20 69 6e 74 6f 20 65 | warning|s into e|
|00003c60| 72 72 6f 72 73 2e 20 20 | 2a 2f 0a 0a 73 74 61 74 |rrors. |*/..stat|
|00003c70| 69 63 20 69 6e 74 20 77 | 61 72 6e 69 6e 67 73 5f |ic int w|arnings_|
|00003c80| 61 72 65 5f 65 72 72 6f | 72 73 3b 0a 0a 2f 2a 20 |are_erro|rs;../* |
|00003c90| 4e 6f 6e 7a 65 72 6f 20 | 6d 65 61 6e 73 20 74 72 |Nonzero |means tr|
|00003ca0| 79 20 74 6f 20 69 6d 69 | 74 61 74 65 20 6f 6c 64 |y to imi|tate old|
|00003cb0| 20 66 61 73 68 69 6f 6e | 65 64 20 6e 6f 6e 2d 41 | fashion|ed non-A|
|00003cc0| 4e 53 49 20 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |NSI prep|rocessor|
|00003cd0| 2e 20 20 2a 2f 0a 0a 69 | 6e 74 20 74 72 61 64 69 |. */..i|nt tradi|
|00003ce0| 74 69 6f 6e 61 6c 3b 0a | 0a 2f 2a 20 4e 6f 6e 7a |tional;.|./* Nonz|
|00003cf0| 65 72 6f 20 63 61 75 73 | 65 73 20 6f 75 74 70 75 |ero caus|es outpu|
|00003d00| 74 20 6e 6f 74 20 74 6f | 20 62 65 20 64 6f 6e 65 |t not to| be done|
|00003d10| 2c 0a 20 20 20 62 75 74 | 20 64 69 72 65 63 74 69 |,. but| directi|
|00003d20| 76 65 73 20 73 75 63 68 | 20 61 73 20 23 64 65 66 |ves such| as #def|
|00003d30| 69 6e 65 20 74 68 61 74 | 20 68 61 76 65 20 73 69 |ine that| have si|
|00003d40| 64 65 20 65 66 66 65 63 | 74 73 0a 20 20 20 61 72 |de effec|ts. ar|
|00003d50| 65 20 73 74 69 6c 6c 20 | 6f 62 65 79 65 64 2e 20 |e still |obeyed. |
|00003d60| 20 2a 2f 0a 0a 73 74 61 | 74 69 63 20 69 6e 74 20 | */..sta|tic int |
|00003d70| 6e 6f 5f 6f 75 74 70 75 | 74 3b 0a 0a 2f 2a 20 4e |no_outpu|t;../* N|
|00003d80| 6f 6e 7a 65 72 6f 20 6d | 65 61 6e 73 20 74 68 69 |onzero m|eans thi|
|00003d90| 73 20 66 69 6c 65 20 77 | 61 73 20 69 6e 63 6c 75 |s file w|as inclu|
|00003da0| 64 65 64 20 77 69 74 68 | 20 61 20 2d 69 6d 61 63 |ded with| a -imac|
|00003db0| 72 6f 73 20 6f 72 20 2d | 69 6e 63 6c 75 64 65 0a |ros or -|include.|
|00003dc0| 20 20 20 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 20 | comma|nd line |
|00003dd0| 61 6e 64 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 62 |and shou|ld not b|
|00003de0| 65 20 72 65 63 6f 72 64 | 65 64 20 61 73 20 61 6e |e record|ed as an|
|00003df0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 2e 20 20 | include| file. |
|00003e00| 2a 2f 0a 0a 73 74 61 74 | 69 63 20 69 6e 74 20 6e |*/..stat|ic int n|
|00003e10| 6f 5f 72 65 63 6f 72 64 | 5f 66 69 6c 65 3b 0a 0a |o_record|_file;..|
|00003e20| 2f 2a 20 4e 6f 6e 7a 65 | 72 6f 20 6d 65 61 6e 73 |/* Nonze|ro means|
|00003e30| 20 74 68 61 74 20 77 65 | 20 68 61 76 65 20 66 69 | that we| have fi|
|00003e40| 6e 69 73 68 65 64 20 70 | 72 6f 63 65 73 73 69 6e |nished p|rocessin|
|00003e50| 67 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |g the co|mmand li|
|00003e60| 6e 65 20 6f 70 74 69 6f | 6e 73 2e 0a 20 20 20 54 |ne optio|ns.. T|
|00003e70| 68 69 73 20 66 6c 61 67 | 20 69 73 20 75 73 65 64 |his flag| is used|
|00003e80| 20 74 6f 20 64 65 63 69 | 64 65 20 77 68 65 74 68 | to deci|de wheth|
|00003e90| 65 72 20 6f 72 20 6e 6f | 74 20 74 6f 20 69 73 73 |er or no|t to iss|
|00003ea0| 75 65 20 63 65 72 74 61 | 69 6e 20 65 72 72 6f 72 |ue certa|in error|
|00003eb0| 73 0a 20 20 20 61 6e 64 | 2f 6f 72 20 77 61 72 6e |s. and|/or warn|
|00003ec0| 69 6e 67 73 2e 20 20 2a | 2f 0a 0a 73 74 61 74 69 |ings. *|/..stati|
|00003ed0| 63 20 69 6e 74 20 64 6f | 6e 65 5f 69 6e 69 74 69 |c int do|ne_initi|
|00003ee0| 61 6c 69 7a 69 6e 67 20 | 3d 20 30 3b 0a 0a 2f 2a |alizing |= 0;../*|
|00003ef0| 20 4c 69 6e 65 20 77 68 | 65 72 65 20 61 20 6e 65 | Line wh|ere a ne|
|00003f00| 77 6c 69 6e 65 20 77 61 | 73 20 66 69 72 73 74 20 |wline wa|s first |
|00003f10| 73 65 65 6e 20 69 6e 20 | 61 20 73 74 72 69 6e 67 |seen in |a string|
|00003f20| 20 63 6f 6e 73 74 61 6e | 74 2e 20 20 2a 2f 0a 0a | constan|t. */..|
|00003f30| 73 74 61 74 69 63 20 69 | 6e 74 20 6d 75 6c 74 69 |static i|nt multi|
|00003f40| 6c 69 6e 65 5f 73 74 72 | 69 6e 67 5f 6c 69 6e 65 |line_str|ing_line|
|00003f50| 20 3d 20 30 3b 0a 0c 0a | 2f 2a 20 49 2f 4f 20 62 | = 0;...|/* I/O b|
|00003f60| 75 66 66 65 72 20 73 74 | 72 75 63 74 75 72 65 2e |uffer st|ructure.|
|00003f70| 0a 20 20 20 54 68 65 20 | 60 66 6e 61 6d 65 27 20 |. The |`fname' |
|00003f80| 66 69 65 6c 64 20 69 73 | 20 6e 6f 6e 7a 65 72 6f |field is| nonzero|
|00003f90| 20 66 6f 72 20 73 6f 75 | 72 63 65 20 66 69 6c 65 | for sou|rce file|
|00003fa0| 73 20 61 6e 64 20 23 69 | 6e 63 6c 75 64 65 20 66 |s and #i|nclude f|
|00003fb0| 69 6c 65 73 0a 20 20 20 | 61 6e 64 20 66 6f 72 20 |iles. |and for |
|00003fc0| 74 68 65 20 64 75 6d 6d | 79 20 74 65 78 74 20 75 |the dumm|y text u|
|00003fd0| 73 65 64 20 66 6f 72 20 | 2d 44 20 61 6e 64 20 2d |sed for |-D and -|
|00003fe0| 55 2e 0a 20 20 20 49 74 | 20 69 73 20 7a 65 72 6f |U.. It| is zero|
|00003ff0| 20 66 6f 72 20 72 65 73 | 63 61 6e 6e 69 6e 67 20 | for res|canning |
|00004000| 72 65 73 75 6c 74 73 20 | 6f 66 20 6d 61 63 72 6f |results |of macro|
|00004010| 20 65 78 70 61 6e 73 69 | 6f 6e 0a 20 20 20 61 6e | expansi|on. an|
|00004020| 64 20 66 6f 72 20 65 78 | 70 61 6e 64 69 6e 67 20 |d for ex|panding |
|00004030| 6d 61 63 72 6f 20 61 72 | 67 75 6d 65 6e 74 73 2e |macro ar|guments.|
|00004040| 20 20 2a 2f 0a 23 64 65 | 66 69 6e 65 20 49 4e 50 | */.#de|fine INP|
|00004050| 55 54 5f 53 54 41 43 4b | 5f 4d 41 58 20 34 30 30 |UT_STACK|_MAX 400|
|00004060| 0a 73 74 61 74 69 63 20 | 73 74 72 75 63 74 20 66 |.static |struct f|
|00004070| 69 6c 65 5f 62 75 66 20 | 7b 0a 20 20 63 68 61 72 |ile_buf |{. char|
|00004080| 20 2a 66 6e 61 6d 65 3b | 0a 20 20 2f 2a 20 46 69 | *fname;|. /* Fi|
|00004090| 6c 65 6e 61 6d 65 20 73 | 70 65 63 69 66 69 65 64 |lename s|pecified|
|000040a0| 20 77 69 74 68 20 23 6c | 69 6e 65 20 64 69 72 65 | with #l|ine dire|
|000040b0| 63 74 69 76 65 2e 20 20 | 2a 2f 0a 20 20 63 68 61 |ctive. |*/. cha|
|000040c0| 72 20 2a 6e 6f 6d 69 6e | 61 6c 5f 66 6e 61 6d 65 |r *nomin|al_fname|
|000040d0| 3b 0a 20 20 2f 2a 20 52 | 65 63 6f 72 64 20 77 68 |;. /* R|ecord wh|
|000040e0| 65 72 65 20 69 6e 20 74 | 68 65 20 73 65 61 72 63 |ere in t|he searc|
|000040f0| 68 20 70 61 74 68 20 74 | 68 69 73 20 66 69 6c 65 |h path t|his file|
|00004100| 20 77 61 73 20 66 6f 75 | 6e 64 2e 0a 20 20 20 20 | was fou|nd.. |
|00004110| 20 46 6f 72 20 23 69 6e | 63 6c 75 64 65 5f 6e 65 | For #in|clude_ne|
|00004120| 78 74 2e 20 20 2a 2f 0a | 20 20 73 74 72 75 63 74 |xt. */.| struct|
|00004130| 20 66 69 6c 65 5f 6e 61 | 6d 65 5f 6c 69 73 74 20 | file_na|me_list |
|00004140| 2a 64 69 72 3b 0a 20 20 | 69 6e 74 20 6c 69 6e 65 |*dir;. |int line|
|00004150| 6e 6f 3b 0a 20 20 69 6e | 74 20 6c 65 6e 67 74 68 |no;. in|t length|
|00004160| 3b 0a 20 20 55 5f 43 48 | 41 52 20 2a 62 75 66 3b |;. U_CH|AR *buf;|
|00004170| 0a 20 20 55 5f 43 48 41 | 52 20 2a 62 75 66 70 3b |. U_CHA|R *bufp;|
|00004180| 0a 20 20 2f 2a 20 4d 61 | 63 72 6f 20 74 68 61 74 |. /* Ma|cro that|
|00004190| 20 74 68 69 73 20 6c 65 | 76 65 6c 20 69 73 20 74 | this le|vel is t|
|000041a0| 68 65 20 65 78 70 61 6e | 73 69 6f 6e 20 6f 66 2e |he expan|sion of.|
|000041b0| 0a 20 20 20 20 20 49 6e | 63 6c 75 64 65 64 20 73 |. In|cluded s|
|000041c0| 6f 20 74 68 61 74 20 77 | 65 20 63 61 6e 20 72 65 |o that w|e can re|
|000041d0| 65 6e 61 62 6c 65 20 74 | 68 65 20 6d 61 63 72 6f |enable t|he macro|
|000041e0| 0a 20 20 20 20 20 61 74 | 20 74 68 65 20 65 6e 64 |. at| the end|
|000041f0| 20 6f 66 20 74 68 69 73 | 20 6c 65 76 65 6c 2e 20 | of this| level. |
|00004200| 20 2a 2f 0a 20 20 73 74 | 72 75 63 74 20 68 61 73 | */. st|ruct has|
|00004210| 68 6e 6f 64 65 20 2a 6d | 61 63 72 6f 3b 0a 20 20 |hnode *m|acro;. |
|00004220| 2f 2a 20 56 61 6c 75 65 | 20 6f 66 20 69 66 5f 73 |/* Value| of if_s|
|00004230| 74 61 63 6b 20 61 74 20 | 73 74 61 72 74 20 6f 66 |tack at |start of|
|00004240| 20 74 68 69 73 20 66 69 | 6c 65 2e 0a 20 20 20 20 | this fi|le.. |
|00004250| 20 55 73 65 64 20 74 6f | 20 70 72 6f 68 69 62 69 | Used to| prohibi|
|00004260| 74 20 75 6e 6d 61 74 63 | 68 65 64 20 23 65 6e 64 |t unmatc|hed #end|
|00004270| 69 66 20 28 65 74 63 29 | 20 69 6e 20 61 6e 20 69 |if (etc)| in an i|
|00004280| 6e 63 6c 75 64 65 20 66 | 69 6c 65 2e 20 20 2a 2f |nclude f|ile. */|
|00004290| 0a 20 20 73 74 72 75 63 | 74 20 69 66 5f 73 74 61 |. struc|t if_sta|
|000042a0| 63 6b 20 2a 69 66 5f 73 | 74 61 63 6b 3b 0a 20 20 |ck *if_s|tack;. |
|000042b0| 2f 2a 20 4f 62 6a 65 63 | 74 20 74 6f 20 62 65 20 |/* Objec|t to be |
|000042c0| 66 72 65 65 64 20 61 74 | 20 65 6e 64 20 6f 66 20 |freed at| end of |
|000042d0| 69 6e 70 75 74 20 61 74 | 20 74 68 69 73 20 6c 65 |input at| this le|
|000042e0| 76 65 6c 2e 20 20 2a 2f | 0a 20 20 55 5f 43 48 41 |vel. */|. U_CHA|
|000042f0| 52 20 2a 66 72 65 65 5f | 70 74 72 3b 0a 20 20 2f |R *free_|ptr;. /|
|00004300| 2a 20 54 72 75 65 20 69 | 66 20 74 68 69 73 20 69 |* True i|f this i|
|00004310| 73 20 61 20 68 65 61 64 | 65 72 20 66 69 6c 65 20 |s a head|er file |
|00004320| 69 6e 63 6c 75 64 65 64 | 20 75 73 69 6e 67 20 3c |included| using <|
|00004330| 46 49 4c 45 4e 41 4d 45 | 3e 2e 20 20 2a 2f 0a 20 |FILENAME|>. */. |
|00004340| 20 63 68 61 72 20 73 79 | 73 74 65 6d 5f 68 65 61 | char sy|stem_hea|
|00004350| 64 65 72 5f 70 3b 0a 7d | 20 69 6e 73 74 61 63 6b |der_p;.}| instack|
|00004360| 5b 49 4e 50 55 54 5f 53 | 54 41 43 4b 5f 4d 41 58 |[INPUT_S|TACK_MAX|
|00004370| 5d 3b 0a 0a 73 74 61 74 | 69 63 20 69 6e 74 20 6c |];..stat|ic int l|
|00004380| 61 73 74 5f 65 72 72 6f | 72 5f 74 69 63 6b 3b 09 |ast_erro|r_tick;.|
|00004390| 20 20 20 2f 2a 20 49 6e | 63 72 65 6d 65 6e 74 65 | /* In|cremente|
|000043a0| 64 20 65 61 63 68 20 74 | 69 6d 65 20 77 65 20 70 |d each t|ime we p|
|000043b0| 72 69 6e 74 20 69 74 2e | 20 20 2a 2f 0a 73 74 61 |rint it.| */.sta|
|000043c0| 74 69 63 20 69 6e 74 20 | 69 6e 70 75 74 5f 66 69 |tic int |input_fi|
|000043d0| 6c 65 5f 73 74 61 63 6b | 5f 74 69 63 6b 3b 20 20 |le_stack|_tick; |
|000043e0| 2f 2a 20 49 6e 63 72 65 | 6d 65 6e 74 65 64 20 77 |/* Incre|mented w|
|000043f0| 68 65 6e 20 74 68 65 20 | 73 74 61 74 75 73 20 63 |hen the |status c|
|00004400| 68 61 6e 67 65 73 2e 20 | 20 2a 2f 0a 0a 2f 2a 20 |hanges. | */../* |
|00004410| 43 75 72 72 65 6e 74 20 | 6e 65 73 74 69 6e 67 20 |Current |nesting |
|00004420| 6c 65 76 65 6c 20 6f 66 | 20 69 6e 70 75 74 20 73 |level of| input s|
|00004430| 6f 75 72 63 65 73 2e 0a | 20 20 20 60 69 6e 73 74 |ources..| `inst|
|00004440| 61 63 6b 5b 69 6e 64 65 | 70 74 68 5d 27 20 69 73 |ack[inde|pth]' is|
|00004450| 20 74 68 65 20 6c 65 76 | 65 6c 20 63 75 72 72 65 | the lev|el curre|
|00004460| 6e 74 6c 79 20 62 65 69 | 6e 67 20 72 65 61 64 2e |ntly bei|ng read.|
|00004470| 20 20 2a 2f 0a 73 74 61 | 74 69 63 20 69 6e 74 20 | */.sta|tic int |
|00004480| 69 6e 64 65 70 74 68 20 | 3d 20 2d 31 3b 0a 23 64 |indepth |= -1;.#d|
|00004490| 65 66 69 6e 65 20 43 48 | 45 43 4b 5f 44 45 50 54 |efine CH|ECK_DEPT|
|000044a0| 48 28 63 6f 64 65 29 20 | 5c 0a 20 20 69 66 20 28 |H(code) |\. if (|
|000044b0| 69 6e 64 65 70 74 68 20 | 3e 3d 20 28 49 4e 50 55 |indepth |>= (INPU|
|000044c0| 54 5f 53 54 41 43 4b 5f | 4d 41 58 20 2d 20 31 29 |T_STACK_|MAX - 1)|
|000044d0| 29 09 09 09 09 09 5c 0a | 20 20 20 20 7b 09 09 09 |).....\.| {...|
|000044e0| 09 09 09 09 09 09 5c 0a | 20 20 20 20 20 20 65 72 |......\.| er|
|000044f0| 72 6f 72 5f 77 69 74 68 | 5f 6c 69 6e 65 20 28 6c |ror_with|_line (l|
|00004500| 69 6e 65 5f 66 6f 72 5f | 65 72 72 6f 72 20 28 69 |ine_for_|error (i|
|00004510| 6e 73 74 61 63 6b 5b 69 | 6e 64 65 70 74 68 5d 2e |nstack[i|ndepth].|
|00004520| 6c 69 6e 65 6e 6f 29 2c | 09 5c 0a 09 09 20 20 20 |lineno),|.\... |
|00004530| 20 20 20 20 22 6d 61 63 | 72 6f 20 6f 72 20 60 23 | "mac|ro or `#|
|00004540| 69 6e 63 6c 75 64 65 27 | 20 72 65 63 75 72 73 69 |include'| recursi|
|00004550| 6f 6e 20 74 6f 6f 20 64 | 65 65 70 22 29 3b 09 5c |on too d|eep");.\|
|00004560| 0a 20 20 20 20 20 20 63 | 6f 64 65 3b 09 09 09 09 |. c|ode;....|
|00004570| 09 09 09 09 5c 0a 20 20 | 20 20 7d 0a 0a 2f 2a 20 |....\. | }../* |
|00004580| 43 75 72 72 65 6e 74 20 | 64 65 70 74 68 20 69 6e |Current |depth in|
|00004590| 20 23 69 6e 63 6c 75 64 | 65 20 64 69 72 65 63 74 | #includ|e direct|
|000045a0| 69 76 65 73 20 74 68 61 | 74 20 75 73 65 20 3c 2e |ives tha|t use <.|
|000045b0| 2e 2e 3e 2e 20 20 2a 2f | 0a 73 74 61 74 69 63 20 |..>. */|.static |
|000045c0| 69 6e 74 20 73 79 73 74 | 65 6d 5f 69 6e 63 6c 75 |int syst|em_inclu|
|000045d0| 64 65 5f 64 65 70 74 68 | 20 3d 20 30 3b 0a 0a 74 |de_depth| = 0;..t|
|000045e0| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 66 69 |ypedef s|truct fi|
|000045f0| 6c 65 5f 62 75 66 20 46 | 49 4c 45 5f 42 55 46 3b |le_buf F|ILE_BUF;|
|00004600| 0a 0a 2f 2a 20 54 68 65 | 20 6f 75 74 70 75 74 20 |../* The| output |
|00004610| 62 75 66 66 65 72 2e 20 | 20 49 74 73 20 4c 45 4e |buffer. | Its LEN|
|00004620| 47 54 48 20 66 69 65 6c | 64 20 69 73 20 74 68 65 |GTH fiel|d is the|
|00004630| 20 61 6d 6f 75 6e 74 20 | 6f 66 20 72 6f 6f 6d 20 | amount |of room |
|00004640| 61 6c 6c 6f 63 61 74 65 | 64 0a 20 20 20 66 6f 72 |allocate|d. for|
|00004650| 20 74 68 65 20 62 75 66 | 66 65 72 2c 20 6e 6f 74 | the buf|fer, not|
|00004660| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 63 | the num|ber of c|
|00004670| 68 61 72 73 20 61 63 74 | 75 61 6c 6c 79 20 70 72 |hars act|ually pr|
|00004680| 65 73 65 6e 74 2e 20 20 | 54 6f 20 67 65 74 0a 20 |esent. |To get. |
|00004690| 20 20 74 68 61 74 2c 20 | 73 75 62 74 72 61 63 74 | that, |subtract|
|000046a0| 20 6f 75 74 62 75 66 2e | 62 75 66 20 66 72 6f 6d | outbuf.|buf from|
|000046b0| 20 6f 75 74 62 75 66 2e | 62 75 66 70 2e 20 2a 2f | outbuf.|bufp. */|
|000046c0| 0a 0a 23 64 65 66 69 6e | 65 20 4f 55 54 42 55 46 |..#defin|e OUTBUF|
|000046d0| 5f 53 49 5a 45 20 31 30 | 09 2f 2a 20 69 6e 69 74 |_SIZE 10|./* init|
|000046e0| 69 61 6c 20 73 69 7a 65 | 20 6f 66 20 6f 75 74 70 |ial size| of outp|
|000046f0| 75 74 20 62 75 66 66 65 | 72 20 2a 2f 0a 73 74 61 |ut buffe|r */.sta|
|00004700| 74 69 63 20 46 49 4c 45 | 5f 42 55 46 20 6f 75 74 |tic FILE|_BUF out|
|00004710| 62 75 66 3b 0a 0a 2f 2a | 20 47 72 6f 77 20 6f 75 |buf;../*| Grow ou|
|00004720| 74 70 75 74 20 62 75 66 | 66 65 72 20 4f 42 55 46 |tput buf|fer OBUF|
|00004730| 20 70 6f 69 6e 74 73 20 | 61 74 0a 20 20 20 73 6f | points |at. so|
|00004740| 20 69 74 20 63 61 6e 20 | 68 6f 6c 64 20 61 74 20 | it can |hold at |
|00004750| 6c 65 61 73 74 20 4e 45 | 45 44 45 44 20 6d 6f 72 |least NE|EDED mor|
|00004760| 65 20 63 68 61 72 73 2e | 20 20 2a 2f 0a 0a 23 64 |e chars.| */..#d|
|00004770| 65 66 69 6e 65 20 63 68 | 65 63 6b 5f 65 78 70 61 |efine ch|eck_expa|
|00004780| 6e 64 28 4f 42 55 46 2c | 20 4e 45 45 44 45 44 29 |nd(OBUF,| NEEDED)|
|00004790| 20 20 5c 0a 20 20 28 28 | 28 4f 42 55 46 29 2d 3e | \. ((|(OBUF)->|
|000047a0| 6c 65 6e 67 74 68 20 2d | 20 28 28 4f 42 55 46 29 |length -| ((OBUF)|
|000047b0| 2d 3e 62 75 66 70 20 2d | 20 28 4f 42 55 46 29 2d |->bufp -| (OBUF)-|
|000047c0| 3e 62 75 66 29 20 3c 3d | 20 28 4e 45 45 44 45 44 |>buf) <=| (NEEDED|
|000047d0| 29 29 20 20 20 5c 0a 20 | 20 20 3f 20 67 72 6f 77 |)) \. | ? grow|
|000047e0| 5f 6f 75 74 62 75 66 20 | 28 28 4f 42 55 46 29 2c |_outbuf |((OBUF),|
|000047f0| 20 28 4e 45 45 44 45 44 | 29 29 20 3a 20 30 29 0a | (NEEDED|)) : 0).|
|00004800| 0a 73 74 72 75 63 74 20 | 66 69 6c 65 5f 6e 61 6d |.struct |file_nam|
|00004810| 65 5f 6c 69 73 74 0a 20 | 20 7b 0a 20 20 20 20 73 |e_list. | {. s|
|00004820| 74 72 75 63 74 20 66 69 | 6c 65 5f 6e 61 6d 65 5f |truct fi|le_name_|
|00004830| 6c 69 73 74 20 2a 6e 65 | 78 74 3b 0a 20 20 20 20 |list *ne|xt;. |
|00004840| 63 68 61 72 20 2a 66 6e | 61 6d 65 3b 0a 20 20 20 |char *fn|ame;. |
|00004850| 20 2f 2a 20 49 66 20 74 | 68 65 20 66 6f 6c 6c 6f | /* If t|he follo|
|00004860| 77 69 6e 67 20 69 73 20 | 6e 6f 6e 7a 65 72 6f 2c |wing is |nonzero,|
|00004870| 20 69 74 20 69 73 20 61 | 20 6d 61 63 72 6f 20 6e | it is a| macro n|
|00004880| 61 6d 65 2e 0a 20 20 20 | 20 20 20 20 44 6f 6e 27 |ame.. | Don'|
|00004890| 74 20 69 6e 63 6c 75 64 | 65 20 74 68 65 20 66 69 |t includ|e the fi|
|000048a0| 6c 65 20 61 67 61 69 6e | 20 69 66 20 74 68 61 74 |le again| if that|
|000048b0| 20 6d 61 63 72 6f 20 69 | 73 20 64 65 66 69 6e 65 | macro i|s define|
|000048c0| 64 2e 20 20 2a 2f 0a 20 | 20 20 20 55 5f 43 48 41 |d. */. | U_CHA|
|000048d0| 52 20 2a 63 6f 6e 74 72 | 6f 6c 5f 6d 61 63 72 6f |R *contr|ol_macro|
|000048e0| 3b 0a 20 20 20 20 2f 2a | 20 49 66 20 74 68 65 20 |;. /*| If the |
|000048f0| 66 6f 6c 6c 6f 77 69 6e | 67 20 69 73 20 6e 6f 6e |followin|g is non|
|00004900| 7a 65 72 6f 2c 20 69 74 | 20 69 73 20 61 20 43 2d |zero, it| is a C-|
|00004910| 6c 61 6e 67 75 61 67 65 | 20 73 79 73 74 65 6d 20 |language| system |
|00004920| 69 6e 63 6c 75 64 65 0a | 20 20 20 20 20 20 20 64 |include.| d|
|00004930| 69 72 65 63 74 6f 72 79 | 2e 20 20 2a 2f 0a 20 20 |irectory|. */. |
|00004940| 20 20 69 6e 74 20 63 5f | 73 79 73 74 65 6d 5f 69 | int c_|system_i|
|00004950| 6e 63 6c 75 64 65 5f 70 | 61 74 68 3b 0a 20 20 20 |nclude_p|ath;. |
|00004960| 20 2f 2a 20 4d 61 70 70 | 69 6e 67 20 6f 66 20 66 | /* Mapp|ing of f|
|00004970| 69 6c 65 20 6e 61 6d 65 | 73 20 66 6f 72 20 74 68 |ile name|s for th|
|00004980| 69 73 20 64 69 72 65 63 | 74 6f 72 79 2e 20 20 2a |is direc|tory. *|
|00004990| 2f 0a 20 20 20 20 73 74 | 72 75 63 74 20 66 69 6c |/. st|ruct fil|
|000049a0| 65 5f 6e 61 6d 65 5f 6d | 61 70 20 2a 6e 61 6d 65 |e_name_m|ap *name|
|000049b0| 5f 6d 61 70 3b 0a 20 20 | 20 20 2f 2a 20 4e 6f 6e |_map;. | /* Non|
|000049c0| 2d 7a 65 72 6f 20 69 66 | 20 6e 61 6d 65 5f 6d 61 |-zero if| name_ma|
|000049d0| 70 20 69 73 20 76 61 6c | 69 64 2e 20 20 2a 2f 0a |p is val|id. */.|
|000049e0| 20 20 20 20 69 6e 74 20 | 67 6f 74 5f 6e 61 6d 65 | int |got_name|
|000049f0| 5f 6d 61 70 3b 0a 20 20 | 7d 3b 0a 0a 2f 2a 20 23 |_map;. |};../* #|
|00004a00| 69 6e 63 6c 75 64 65 20 | 22 66 69 6c 65 22 20 6c |include |"file" l|
|00004a10| 6f 6f 6b 73 20 69 6e 20 | 73 6f 75 72 63 65 20 66 |ooks in |source f|
|00004a20| 69 6c 65 20 64 69 72 2c | 20 74 68 65 6e 20 73 74 |ile dir,| then st|
|00004a30| 61 63 6b 2e 20 2a 2f 0a | 2f 2a 20 23 69 6e 63 6c |ack. */.|/* #incl|
|00004a40| 75 64 65 20 3c 66 69 6c | 65 3e 20 6a 75 73 74 20 |ude <fil|e> just |
|00004a50| 6c 6f 6f 6b 73 20 69 6e | 20 74 68 65 20 73 74 61 |looks in| the sta|
|00004a60| 63 6b 2e 20 2a 2f 0a 2f | 2a 20 2d 49 20 64 69 72 |ck. */./|* -I dir|
|00004a70| 65 63 74 6f 72 69 65 73 | 20 61 72 65 20 61 64 64 |ectories| are add|
|00004a80| 65 64 20 74 6f 20 74 68 | 65 20 65 6e 64 2c 20 74 |ed to th|e end, t|
|00004a90| 68 65 6e 20 74 68 65 20 | 64 65 66 61 75 6c 74 73 |hen the |defaults|
|00004aa0| 20 61 72 65 20 61 64 64 | 65 64 2e 20 2a 2f 0a 2f | are add|ed. */./|
|00004ab0| 2a 20 54 68 65 20 2a 2f | 0a 73 74 61 74 69 63 20 |* The */|.static |
|00004ac0| 73 74 72 75 63 74 20 64 | 65 66 61 75 6c 74 5f 69 |struct d|efault_i|
|00004ad0| 6e 63 6c 75 64 65 20 7b | 0a 20 20 63 68 61 72 20 |nclude {|. char |
|00004ae0| 2a 66 6e 61 6d 65 3b 09 | 09 09 2f 2a 20 54 68 65 |*fname;.|../* The|
|00004af0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 64 69 72 | name of| the dir|
|00004b00| 65 63 74 6f 72 79 2e 20 | 20 2a 2f 0a 20 20 69 6e |ectory. | */. in|
|00004b10| 74 20 63 70 6c 75 73 70 | 6c 75 73 3b 09 09 2f 2a |t cplusp|lus;../*|
|00004b20| 20 4f 6e 6c 79 20 6c 6f | 6f 6b 20 68 65 72 65 20 | Only lo|ok here |
|00004b30| 69 66 20 77 65 27 72 65 | 20 63 6f 6d 70 69 6c 69 |if we're| compili|
|00004b40| 6e 67 20 43 2b 2b 2e 20 | 20 2a 2f 0a 20 20 69 6e |ng C++. | */. in|
|00004b50| 74 20 63 78 78 5f 61 77 | 61 72 65 3b 09 09 2f 2a |t cxx_aw|are;../*|
|00004b60| 20 49 6e 63 6c 75 64 65 | 73 20 69 6e 20 74 68 69 | Include|s in thi|
|00004b70| 73 20 64 69 72 65 63 74 | 6f 72 79 20 64 6f 6e 27 |s direct|ory don'|
|00004b80| 74 20 6e 65 65 64 20 74 | 6f 0a 09 09 09 09 20 20 |t need t|o..... |
|00004b90| 20 62 65 20 77 72 61 70 | 70 65 64 20 69 6e 20 65 | be wrap|ped in e|
|00004ba0| 78 74 65 72 6e 20 22 43 | 22 20 77 68 65 6e 20 63 |xtern "C|" when c|
|00004bb0| 6f 6d 70 69 6c 69 6e 67 | 0a 09 09 09 09 20 20 20 |ompiling|..... |
|00004bc0| 43 2b 2b 2e 20 20 2a 2f | 0a 7d 20 69 6e 63 6c 75 |C++. */|.} inclu|
|00004bd0| 64 65 5f 64 65 66 61 75 | 6c 74 73 5f 61 72 72 61 |de_defau|lts_arra|
|00004be0| 79 5b 5d 0a 23 69 66 64 | 65 66 20 49 4e 43 4c 55 |y[].#ifd|ef INCLU|
|00004bf0| 44 45 5f 44 45 46 41 55 | 4c 54 53 0a 20 20 3d 20 |DE_DEFAU|LTS. = |
|00004c00| 49 4e 43 4c 55 44 45 5f | 44 45 46 41 55 4c 54 53 |INCLUDE_|DEFAULTS|
|00004c10| 3b 0a 23 65 6c 73 65 0a | 20 20 3d 20 7b 0a 20 20 |;.#else.| = {. |
|00004c20| 20 20 2f 2a 20 50 69 63 | 6b 20 75 70 20 47 4e 55 | /* Pic|k up GNU|
|00004c30| 20 43 2b 2b 20 73 70 65 | 63 69 66 69 63 20 69 6e | C++ spe|cific in|
|00004c40| 63 6c 75 64 65 20 66 69 | 6c 65 73 2e 20 20 2a 2f |clude fi|les. */|
|00004c50| 0a 20 20 20 20 7b 20 47 | 50 4c 55 53 50 4c 55 53 |. { G|PLUSPLUS|
|00004c60| 5f 49 4e 43 4c 55 44 45 | 5f 44 49 52 2c 20 31 2c |_INCLUDE|_DIR, 1,|
|00004c70| 20 31 20 7d 2c 0a 23 69 | 66 64 65 66 20 43 52 4f | 1 },.#i|fdef CRO|
|00004c80| 53 53 5f 43 4f 4d 50 49 | 4c 45 0a 20 20 20 20 2f |SS_COMPI|LE. /|
|00004c90| 2a 20 54 68 69 73 20 69 | 73 20 74 68 65 20 64 69 |* This i|s the di|
|00004ca0| 72 20 66 6f 72 20 66 69 | 78 69 6e 63 6c 75 64 65 |r for fi|xinclude|
|00004cb0| 73 2e 20 20 50 75 74 20 | 69 74 20 6a 75 73 74 20 |s. Put |it just |
|00004cc0| 62 65 66 6f 72 65 0a 20 | 20 20 20 20 20 20 74 68 |before. | th|
|00004cd0| 65 20 66 69 6c 65 73 20 | 74 68 61 74 20 77 65 20 |e files |that we |
|00004ce0| 66 69 78 2e 20 20 2a 2f | 0a 20 20 20 20 7b 20 47 |fix. */|. { G|
|00004cf0| 43 43 5f 49 4e 43 4c 55 | 44 45 5f 44 49 52 2c 20 |CC_INCLU|DE_DIR, |
|00004d00| 30 2c 20 30 20 7d 2c 0a | 20 20 20 20 2f 2a 20 46 |0, 0 },.| /* F|
|00004d10| 6f 72 20 63 72 6f 73 73 | 2d 63 6f 6d 70 69 6c 61 |or cross|-compila|
|00004d20| 74 69 6f 6e 2c 20 74 68 | 69 73 20 64 69 72 20 6e |tion, th|is dir n|
|00004d30| 61 6d 65 20 69 73 20 67 | 65 6e 65 72 61 74 65 64 |ame is g|enerated|
|00004d40| 0a 20 20 20 20 20 20 20 | 61 75 74 6f 6d 61 74 69 |. |automati|
|00004d50| 63 61 6c 6c 79 20 69 6e | 20 4d 61 6b 65 66 69 6c |cally in| Makefil|
|00004d60| 65 2e 69 6e 2e 20 20 2a | 2f 0a 20 20 20 20 7b 20 |e.in. *|/. { |
|00004d70| 43 52 4f 53 53 5f 49 4e | 43 4c 55 44 45 5f 44 49 |CROSS_IN|CLUDE_DI|
|00004d80| 52 2c 20 30 2c 20 30 20 | 7d 2c 0a 20 20 20 20 2f |R, 0, 0 |},. /|
|00004d90| 2a 20 54 68 69 73 20 69 | 73 20 61 6e 6f 74 68 65 |* This i|s anothe|
|00004da0| 72 20 70 6c 61 63 65 20 | 74 68 61 74 20 74 68 65 |r place |that the|
|00004db0| 20 74 61 72 67 65 74 20 | 73 79 73 74 65 6d 27 73 | target |system's|
|00004dc0| 20 68 65 61 64 65 72 73 | 20 6d 69 67 68 74 20 62 | headers| might b|
|00004dd0| 65 2e 20 20 2a 2f 0a 20 | 20 20 20 7b 20 54 4f 4f |e. */. | { TOO|
|00004de0| 4c 5f 49 4e 43 4c 55 44 | 45 5f 44 49 52 2c 20 30 |L_INCLUD|E_DIR, 0|
|00004df0| 2c 20 30 20 7d 2c 0a 23 | 65 6c 73 65 20 2f 2a 20 |, 0 },.#|else /* |
|00004e00| 6e 6f 74 20 43 52 4f 53 | 53 5f 43 4f 4d 50 49 4c |not CROS|S_COMPIL|
|00004e10| 45 20 2a 2f 0a 20 20 20 | 20 2f 2a 20 54 68 69 73 |E */. | /* This|
|00004e20| 20 73 68 6f 75 6c 64 20 | 62 65 20 2f 75 73 72 2f | should |be /usr/|
|00004e30| 6c 6f 63 61 6c 2f 69 6e | 63 6c 75 64 65 20 61 6e |local/in|clude an|
|00004e40| 64 20 73 68 6f 75 6c 64 | 20 63 6f 6d 65 20 62 65 |d should| come be|
|00004e50| 66 6f 72 65 0a 20 20 20 | 20 20 20 20 74 68 65 20 |fore. | the |
|00004e60| 66 69 78 69 6e 63 6c 75 | 64 65 73 2d 66 69 78 65 |fixinclu|des-fixe|
|00004e70| 64 20 68 65 61 64 65 72 | 20 66 69 6c 65 73 2e 20 |d header| files. |
|00004e80| 20 2a 2f 0a 20 20 20 20 | 7b 20 4c 4f 43 41 4c 5f | */. |{ LOCAL_|
|00004e90| 49 4e 43 4c 55 44 45 5f | 44 49 52 2c 20 30 2c 20 |INCLUDE_|DIR, 0, |
|00004ea0| 31 20 7d 2c 0a 20 20 20 | 20 2f 2a 20 54 68 69 73 |1 },. | /* This|
|00004eb0| 20 69 73 20 68 65 72 65 | 20 61 68 65 61 64 20 6f | is here| ahead o|
|00004ec0| 66 20 47 43 43 5f 49 4e | 43 4c 55 44 45 5f 44 49 |f GCC_IN|CLUDE_DI|
|00004ed0| 52 20 62 65 63 61 75 73 | 65 20 61 73 73 65 72 74 |R becaus|e assert|
|00004ee0| 2e 68 20 67 6f 65 73 20 | 68 65 72 65 2e 0a 20 20 |.h goes |here.. |
|00004ef0| 20 20 20 20 20 4c 69 6b | 65 77 69 73 65 2c 20 62 | Lik|ewise, b|
|00004f00| 65 68 69 6e 64 20 4c 4f | 43 41 4c 5f 49 4e 43 4c |ehind LO|CAL_INCL|
|00004f10| 55 44 45 5f 44 49 52 2c | 20 77 68 65 72 65 20 67 |UDE_DIR,| where g|
|00004f20| 6c 69 62 63 20 70 75 74 | 73 20 69 74 73 20 61 73 |libc put|s its as|
|00004f30| 73 65 72 74 2e 68 2e 20 | 20 2a 2f 0a 20 20 20 20 |sert.h. | */. |
|00004f40| 7b 20 54 4f 4f 4c 5f 49 | 4e 43 4c 55 44 45 5f 44 |{ TOOL_I|NCLUDE_D|
|00004f50| 49 52 2c 20 30 2c 20 30 | 20 7d 2c 0a 20 20 20 20 |IR, 0, 0| },. |
|00004f60| 2f 2a 20 54 68 69 73 20 | 69 73 20 74 68 65 20 64 |/* This |is the d|
|00004f70| 69 72 20 66 6f 72 20 66 | 69 78 69 6e 63 6c 75 64 |ir for f|ixinclud|
|00004f80| 65 73 2e 20 20 50 75 74 | 20 69 74 20 6a 75 73 74 |es. Put| it just|
|00004f90| 20 62 65 66 6f 72 65 0a | 20 20 20 20 20 20 20 74 | before.| t|
|00004fa0| 68 65 20 66 69 6c 65 73 | 20 74 68 61 74 20 77 65 |he files| that we|
|00004fb0| 20 66 69 78 2e 20 20 2a | 2f 0a 20 20 20 20 7b 20 | fix. *|/. { |
|00004fc0| 47 43 43 5f 49 4e 43 4c | 55 44 45 5f 44 49 52 2c |GCC_INCL|UDE_DIR,|
|00004fd0| 20 30 2c 20 30 20 7d 2c | 0a 20 20 20 20 2f 2a 20 | 0, 0 },|. /* |
|00004fe0| 53 6f 6d 65 20 73 79 73 | 74 65 6d 73 20 68 61 76 |Some sys|tems hav|
|00004ff0| 65 20 61 6e 20 65 78 74 | 72 61 20 64 69 72 20 6f |e an ext|ra dir o|
|00005000| 66 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 2e |f includ|e files.|
|00005010| 20 20 2a 2f 0a 23 69 66 | 64 65 66 20 53 59 53 54 | */.#if|def SYST|
|00005020| 45 4d 5f 49 4e 43 4c 55 | 44 45 5f 44 49 52 0a 20 |EM_INCLU|DE_DIR. |
|00005030| 20 20 20 7b 20 53 59 53 | 54 45 4d 5f 49 4e 43 4c | { SYS|TEM_INCL|
|00005040| 55 44 45 5f 44 49 52 2c | 20 30 2c 20 30 20 7d 2c |UDE_DIR,| 0, 0 },|
|00005050| 0a 23 65 6e 64 69 66 0a | 20 20 20 20 7b 20 53 54 |.#endif.| { ST|
|00005060| 41 4e 44 41 52 44 5f 49 | 4e 43 4c 55 44 45 5f 44 |ANDARD_I|NCLUDE_D|
|00005070| 49 52 2c 20 30 2c 20 30 | 20 7d 2c 0a 23 65 6e 64 |IR, 0, 0| },.#end|
|00005080| 69 66 20 2f 2a 20 6e 6f | 74 20 43 52 4f 53 53 5f |if /* no|t CROSS_|
|00005090| 43 4f 4d 50 49 4c 45 20 | 2a 2f 0a 20 20 20 20 7b |COMPILE |*/. {|
|000050a0| 20 30 2c 20 30 2c 20 30 | 20 7d 0a 20 20 20 20 7d | 0, 0, 0| }. }|
|000050b0| 3b 0a 23 65 6e 64 69 66 | 20 2f 2a 20 6e 6f 20 49 |;.#endif| /* no I|
|000050c0| 4e 43 4c 55 44 45 5f 44 | 45 46 41 55 4c 54 53 20 |NCLUDE_D|EFAULTS |
|000050d0| 2a 2f 0a 0a 2f 2a 20 54 | 68 65 20 63 6f 64 65 20 |*/../* T|he code |
|000050e0| 6c 6f 6f 6b 73 20 61 74 | 20 74 68 65 20 64 65 66 |looks at| the def|
|000050f0| 61 75 6c 74 73 20 74 68 | 72 6f 75 67 68 20 74 68 |aults th|rough th|
|00005100| 69 73 20 70 6f 69 6e 74 | 65 72 2c 20 72 61 74 68 |is point|er, rath|
|00005110| 65 72 20 74 68 61 6e 20 | 74 68 72 6f 75 67 68 0a |er than |through.|
|00005120| 20 20 20 74 68 65 20 63 | 6f 6e 73 74 61 6e 74 20 | the c|onstant |
|00005130| 73 74 72 75 63 74 75 72 | 65 20 61 62 6f 76 65 2e |structur|e above.|
|00005140| 20 20 54 68 69 73 20 70 | 6f 69 6e 74 65 72 20 67 | This p|ointer g|
|00005150| 65 74 73 20 63 68 61 6e | 67 65 64 20 69 66 20 61 |ets chan|ged if a|
|00005160| 6e 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 0a 20 20 |n enviro|nment. |
|00005170| 20 76 61 72 69 61 62 6c | 65 20 73 70 65 63 69 66 | variabl|e specif|
|00005180| 69 65 73 20 6f 74 68 65 | 72 20 64 65 66 61 75 6c |ies othe|r defaul|
|00005190| 74 73 2e 20 20 2a 2f 0a | 73 74 61 74 69 63 20 73 |ts. */.|static s|
|000051a0| 74 72 75 63 74 20 64 65 | 66 61 75 6c 74 5f 69 6e |truct de|fault_in|
|000051b0| 63 6c 75 64 65 20 2a 69 | 6e 63 6c 75 64 65 5f 64 |clude *i|nclude_d|
|000051c0| 65 66 61 75 6c 74 73 20 | 3d 20 69 6e 63 6c 75 64 |efaults |= includ|
|000051d0| 65 5f 64 65 66 61 75 6c | 74 73 5f 61 72 72 61 79 |e_defaul|ts_array|
|000051e0| 3b 0a 0a 73 74 61 74 69 | 63 20 73 74 72 75 63 74 |;..stati|c struct|
|000051f0| 20 66 69 6c 65 5f 6e 61 | 6d 65 5f 6c 69 73 74 20 | file_na|me_list |
|00005200| 2a 69 6e 63 6c 75 64 65 | 20 3d 20 30 3b 09 2f 2a |*include| = 0;./*|
|00005210| 20 46 69 72 73 74 20 64 | 69 72 20 74 6f 20 73 65 | First d|ir to se|
|00005220| 61 72 63 68 20 2a 2f 0a | 09 2f 2a 20 46 69 72 73 |arch */.|./* Firs|
|00005230| 74 20 64 69 72 20 74 6f | 20 73 65 61 72 63 68 20 |t dir to| search |
|00005240| 66 6f 72 20 3c 66 69 6c | 65 3e 20 2a 2f 0a 2f 2a |for <fil|e> */./*|
|00005250| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 66 69 72 | This is| the fir|
|00005260| 73 74 20 65 6c 65 6d 65 | 6e 74 20 74 6f 20 75 73 |st eleme|nt to us|
|00005270| 65 20 66 6f 72 20 23 69 | 6e 63 6c 75 64 65 20 3c |e for #i|nclude <|
|00005280| 2e 2e 2e 3e 2e 0a 20 20 | 20 49 66 20 69 74 20 69 |...>.. | If it i|
|00005290| 73 20 30 2c 20 75 73 65 | 20 74 68 65 20 65 6e 74 |s 0, use| the ent|
|000052a0| 69 72 65 20 63 68 61 69 | 6e 20 66 6f 72 20 73 75 |ire chai|n for su|
|000052b0| 63 68 20 69 6e 63 6c 75 | 64 65 73 2e 20 20 2a 2f |ch inclu|des. */|
|000052c0| 0a 73 74 61 74 69 63 20 | 73 74 72 75 63 74 20 66 |.static |struct f|
|000052d0| 69 6c 65 5f 6e 61 6d 65 | 5f 6c 69 73 74 20 2a 66 |ile_name|_list *f|
|000052e0| 69 72 73 74 5f 62 72 61 | 63 6b 65 74 5f 69 6e 63 |irst_bra|cket_inc|
|000052f0| 6c 75 64 65 20 3d 20 30 | 3b 0a 2f 2a 20 54 68 69 |lude = 0|;./* Thi|
|00005300| 73 20 69 73 20 74 68 65 | 20 66 69 72 73 74 20 65 |s is the| first e|
|00005310| 6c 65 6d 65 6e 74 20 69 | 6e 20 74 68 65 20 63 68 |lement i|n the ch|
|00005320| 61 69 6e 20 74 68 61 74 | 20 63 6f 72 72 65 73 70 |ain that| corresp|
|00005330| 6f 6e 64 73 20 74 6f 0a | 20 20 20 61 20 64 69 72 |onds to.| a dir|
|00005340| 65 63 74 6f 72 79 20 6f | 66 20 73 79 73 74 65 6d |ectory o|f system|
|00005350| 20 68 65 61 64 65 72 20 | 66 69 6c 65 73 2e 20 20 | header |files. |
|00005360| 2a 2f 0a 73 74 61 74 69 | 63 20 73 74 72 75 63 74 |*/.stati|c struct|
|00005370| 20 66 69 6c 65 5f 6e 61 | 6d 65 5f 6c 69 73 74 20 | file_na|me_list |
|00005380| 2a 66 69 72 73 74 5f 73 | 79 73 74 65 6d 5f 69 6e |*first_s|ystem_in|
|00005390| 63 6c 75 64 65 20 3d 20 | 30 3b 0a 73 74 61 74 69 |clude = |0;.stati|
|000053a0| 63 20 73 74 72 75 63 74 | 20 66 69 6c 65 5f 6e 61 |c struct| file_na|
|000053b0| 6d 65 5f 6c 69 73 74 20 | 2a 6c 61 73 74 5f 69 6e |me_list |*last_in|
|000053c0| 63 6c 75 64 65 20 3d 20 | 30 3b 09 2f 2a 20 4c 61 |clude = |0;./* La|
|000053d0| 73 74 20 69 6e 20 63 68 | 61 69 6e 20 2a 2f 0a 0a |st in ch|ain */..|
|000053e0| 2f 2a 20 43 68 61 69 6e | 20 6f 66 20 69 6e 63 6c |/* Chain| of incl|
|000053f0| 75 64 65 20 64 69 72 65 | 63 74 6f 72 69 65 73 20 |ude dire|ctories |
|00005400| 74 6f 20 70 75 74 20 61 | 74 20 74 68 65 20 65 6e |to put a|t the en|
|00005410| 64 20 6f 66 20 74 68 65 | 20 6f 74 68 65 72 20 63 |d of the| other c|
|00005420| 68 61 69 6e 2e 20 20 2a | 2f 0a 73 74 61 74 69 63 |hain. *|/.static|
|00005430| 20 73 74 72 75 63 74 20 | 66 69 6c 65 5f 6e 61 6d | struct |file_nam|
|00005440| 65 5f 6c 69 73 74 20 2a | 61 66 74 65 72 5f 69 6e |e_list *|after_in|
|00005450| 63 6c 75 64 65 20 3d 20 | 30 3b 0a 73 74 61 74 69 |clude = |0;.stati|
|00005460| 63 20 73 74 72 75 63 74 | 20 66 69 6c 65 5f 6e 61 |c struct| file_na|
|00005470| 6d 65 5f 6c 69 73 74 20 | 2a 6c 61 73 74 5f 61 66 |me_list |*last_af|
|00005480| 74 65 72 5f 69 6e 63 6c | 75 64 65 20 3d 20 30 3b |ter_incl|ude = 0;|
|00005490| 09 2f 2a 20 4c 61 73 74 | 20 69 6e 20 63 68 61 69 |./* Last| in chai|
|000054a0| 6e 20 2a 2f 0a 0a 2f 2a | 20 43 68 61 69 6e 20 74 |n */../*| Chain t|
|000054b0| 6f 20 70 75 74 20 61 74 | 20 74 68 65 20 73 74 61 |o put at| the sta|
|000054c0| 72 74 20 6f 66 20 74 68 | 65 20 73 79 73 74 65 6d |rt of th|e system|
|000054d0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 73 2e 20 | include| files. |
|000054e0| 20 2a 2f 0a 73 74 61 74 | 69 63 20 73 74 72 75 63 | */.stat|ic struc|
|000054f0| 74 20 66 69 6c 65 5f 6e | 61 6d 65 5f 6c 69 73 74 |t file_n|ame_list|
|00005500| 20 2a 62 65 66 6f 72 65 | 5f 73 79 73 74 65 6d 20 | *before|_system |
|00005510| 3d 20 30 3b 0a 73 74 61 | 74 69 63 20 73 74 72 75 |= 0;.sta|tic stru|
|00005520| 63 74 20 66 69 6c 65 5f | 6e 61 6d 65 5f 6c 69 73 |ct file_|name_lis|
|00005530| 74 20 2a 6c 61 73 74 5f | 62 65 66 6f 72 65 5f 73 |t *last_|before_s|
|00005540| 79 73 74 65 6d 20 3d 20 | 30 3b 09 2f 2a 20 4c 61 |ystem = |0;./* La|
|00005550| 73 74 20 69 6e 20 63 68 | 61 69 6e 20 2a 2f 0a 0a |st in ch|ain */..|
|00005560| 2f 2a 20 4c 69 73 74 20 | 6f 66 20 69 6e 63 6c 75 |/* List |of inclu|
|00005570| 64 65 64 20 66 69 6c 65 | 73 20 74 68 61 74 20 63 |ded file|s that c|
|00005580| 6f 6e 74 61 69 6e 65 64 | 20 23 70 72 61 67 6d 61 |ontained| #pragma|
|00005590| 20 6f 6e 63 65 2e 20 20 | 2a 2f 0a 73 74 61 74 69 | once. |*/.stati|
|000055a0| 63 20 73 74 72 75 63 74 | 20 66 69 6c 65 5f 6e 61 |c struct| file_na|
|000055b0| 6d 65 5f 6c 69 73 74 20 | 2a 64 6f 6e 74 5f 72 65 |me_list |*dont_re|
|000055c0| 70 65 61 74 5f 66 69 6c | 65 73 20 3d 20 30 3b 0a |peat_fil|es = 0;.|
|000055d0| 0a 2f 2a 20 4c 69 73 74 | 20 6f 66 20 6f 74 68 65 |./* List| of othe|
|000055e0| 72 20 69 6e 63 6c 75 64 | 65 64 20 66 69 6c 65 73 |r includ|ed files|
|000055f0| 2e 0a 20 20 20 49 66 20 | 2d 3e 63 6f 6e 74 72 6f |.. If |->contro|
|00005600| 6c 5f 6d 61 63 72 6f 20 | 69 66 20 6e 6f 6e 7a 65 |l_macro |if nonze|
|00005610| 72 6f 2c 20 74 68 65 20 | 66 69 6c 65 20 68 61 64 |ro, the |file had|
|00005620| 20 61 20 23 69 66 6e 64 | 65 66 0a 20 20 20 61 72 | a #ifnd|ef. ar|
|00005630| 6f 75 6e 64 20 74 68 65 | 20 65 6e 74 69 72 65 20 |ound the| entire |
|00005640| 63 6f 6e 74 65 6e 74 73 | 2c 20 61 6e 64 20 2d 3e |contents|, and ->|
|00005650| 63 6f 6e 74 72 6f 6c 5f | 6d 61 63 72 6f 20 67 69 |control_|macro gi|
|00005660| 76 65 73 20 74 68 65 20 | 6d 61 63 72 6f 20 6e 61 |ves the |macro na|
|00005670| 6d 65 2e 20 20 2a 2f 0a | 73 74 61 74 69 63 20 73 |me. */.|static s|
|00005680| 74 72 75 63 74 20 66 69 | 6c 65 5f 6e 61 6d 65 5f |truct fi|le_name_|
|00005690| 6c 69 73 74 20 2a 61 6c | 6c 5f 69 6e 63 6c 75 64 |list *al|l_includ|
|000056a0| 65 5f 66 69 6c 65 73 20 | 3d 20 30 3b 0a 0a 2f 2a |e_files |= 0;../*|
|000056b0| 20 44 69 72 65 63 74 6f | 72 79 20 70 72 65 66 69 | Directo|ry prefi|
|000056c0| 78 20 74 68 61 74 20 73 | 68 6f 75 6c 64 20 72 65 |x that s|hould re|
|000056d0| 70 6c 61 63 65 20 60 2f | 75 73 72 27 20 69 6e 20 |place `/|usr' in |
|000056e0| 74 68 65 20 73 74 61 6e | 64 61 72 64 0a 20 20 20 |the stan|dard. |
|000056f0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 20 64 69 72 |include |file dir|
|00005700| 65 63 74 6f 72 69 65 73 | 2e 20 20 2a 2f 0a 73 74 |ectories|. */.st|
|00005710| 61 74 69 63 20 63 68 61 | 72 20 2a 69 6e 63 6c 75 |atic cha|r *inclu|
|00005720| 64 65 5f 70 72 65 66 69 | 78 3b 0a 0a 2f 2a 20 47 |de_prefi|x;../* G|
|00005730| 6c 6f 62 61 6c 20 6c 69 | 73 74 20 6f 66 20 73 74 |lobal li|st of st|
|00005740| 72 69 6e 67 73 20 72 65 | 61 64 20 69 6e 20 66 72 |rings re|ad in fr|
|00005750| 6f 6d 20 70 72 65 63 6f | 6d 70 69 6c 65 64 20 66 |om preco|mpiled f|
|00005760| 69 6c 65 73 2e 20 20 54 | 68 69 73 20 6c 69 73 74 |iles. T|his list|
|00005770| 0a 20 20 20 69 73 20 6b | 65 70 74 20 69 6e 20 74 |. is k|ept in t|
|00005780| 68 65 20 6f 72 64 65 72 | 20 74 68 65 20 73 74 72 |he order| the str|
|00005790| 69 6e 67 73 20 61 72 65 | 20 72 65 61 64 20 69 6e |ings are| read in|
|000057a0| 2c 20 77 69 74 68 20 6e | 65 77 20 73 74 72 69 6e |, with n|ew strin|
|000057b0| 67 73 20 62 65 69 6e 67 | 0a 20 20 20 61 64 64 65 |gs being|. adde|
|000057c0| 64 20 61 74 20 74 68 65 | 20 65 6e 64 20 74 68 72 |d at the| end thr|
|000057d0| 6f 75 67 68 20 73 74 72 | 69 6e 67 6c 69 73 74 5f |ough str|inglist_|
|000057e0| 74 61 69 6c 70 2e 20 20 | 57 65 20 75 73 65 20 74 |tailp. |We use t|
|000057f0| 68 69 73 20 6c 69 73 74 | 20 74 6f 20 6f 75 74 70 |his list| to outp|
|00005800| 75 74 0a 20 20 20 74 68 | 65 20 73 74 72 69 6e 67 |ut. th|e string|
|00005810| 73 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |s at the| end of |
|00005820| 74 68 65 20 72 75 6e 2e | 20 0a 2a 2f 0a 73 74 61 |the run.| .*/.sta|
|00005830| 74 69 63 20 53 54 52 49 | 4e 47 44 45 46 20 2a 73 |tic STRI|NGDEF *s|
|00005840| 74 72 69 6e 67 6c 69 73 | 74 3b 0a 73 74 61 74 69 |tringlis|t;.stati|
|00005850| 63 20 53 54 52 49 4e 47 | 44 45 46 20 2a 2a 73 74 |c STRING|DEF **st|
|00005860| 72 69 6e 67 6c 69 73 74 | 5f 74 61 69 6c 70 20 3d |ringlist|_tailp =|
|00005870| 20 26 73 74 72 69 6e 67 | 6c 69 73 74 3b 0a 0a 0a | &string|list;...|
|00005880| 2f 2a 20 53 74 72 75 63 | 74 75 72 65 20 72 65 74 |/* Struc|ture ret|
|00005890| 75 72 6e 65 64 20 62 79 | 20 63 72 65 61 74 65 5f |urned by| create_|
|000058a0| 64 65 66 69 6e 69 74 69 | 6f 6e 20 2a 2f 0a 74 79 |definiti|on */.ty|
|000058b0| 70 65 64 65 66 20 73 74 | 72 75 63 74 20 6d 61 63 |pedef st|ruct mac|
|000058c0| 72 6f 64 65 66 20 4d 41 | 43 52 4f 44 45 46 3b 0a |rodef MA|CRODEF;.|
|000058d0| 73 74 72 75 63 74 20 6d | 61 63 72 6f 64 65 66 0a |struct m|acrodef.|
|000058e0| 7b 0a 20 20 73 74 72 75 | 63 74 20 64 65 66 69 6e |{. stru|ct defin|
|000058f0| 69 74 69 6f 6e 20 2a 64 | 65 66 6e 3b 0a 20 20 55 |ition *d|efn;. U|
|00005900| 5f 43 48 41 52 20 2a 73 | 79 6d 6e 61 6d 3b 0a 20 |_CHAR *s|ymnam;. |
|00005910| 20 69 6e 74 20 73 79 6d | 6c 65 6e 3b 0a 7d 3b 0a | int sym|len;.};.|
|00005920| 0c 0a 65 6e 75 6d 20 73 | 68 61 72 70 5f 74 6f 6b |..enum s|harp_tok|
|00005930| 65 6e 5f 74 79 70 65 20 | 7b 0a 20 20 4e 4f 5f 53 |en_type |{. NO_S|
|00005940| 48 41 52 50 5f 54 4f 4b | 45 4e 20 3d 20 30 2c 09 |HARP_TOK|EN = 0,.|
|00005950| 09 2f 2a 20 74 6f 6b 65 | 6e 20 6e 6f 74 20 70 72 |./* toke|n not pr|
|00005960| 65 73 65 6e 74 20 2a 2f | 0a 0a 20 20 53 48 41 52 |esent */|.. SHAR|
|00005970| 50 5f 54 4f 4b 45 4e 20 | 3d 20 27 23 27 2c 09 09 |P_TOKEN |= '#',..|
|00005980| 2f 2a 20 74 6f 6b 65 6e | 20 73 70 65 6c 6c 65 64 |/* token| spelled|
|00005990| 20 77 69 74 68 20 23 20 | 6f 6e 6c 79 20 2a 2f 0a | with # |only */.|
|000059a0| 20 20 57 48 49 54 45 5f | 53 48 41 52 50 5f 54 4f | WHITE_|SHARP_TO|
|000059b0| 4b 45 4e 2c 09 09 2f 2a | 20 74 6f 6b 65 6e 20 73 |KEN,../*| token s|
|000059c0| 70 65 6c 6c 65 64 20 77 | 69 74 68 20 23 20 61 6e |pelled w|ith # an|
|000059d0| 64 20 77 68 69 74 65 20 | 73 70 61 63 65 20 2a 2f |d white |space */|
|000059e0| 0a 0a 20 20 50 45 52 43 | 45 4e 54 5f 43 4f 4c 4f |.. PERC|ENT_COLO|
|000059f0| 4e 5f 54 4f 4b 45 4e 20 | 3d 20 27 25 27 2c 09 2f |N_TOKEN |= '%',./|
|00005a00| 2a 20 74 6f 6b 65 6e 20 | 73 70 65 6c 6c 65 64 20 |* token |spelled |
|00005a10| 77 69 74 68 20 25 3a 20 | 6f 6e 6c 79 20 2a 2f 0a |with %: |only */.|
|00005a20| 20 20 57 48 49 54 45 5f | 50 45 52 43 45 4e 54 5f | WHITE_|PERCENT_|
|00005a30| 43 4f 4c 4f 4e 5f 54 4f | 4b 45 4e 09 2f 2a 20 74 |COLON_TO|KEN./* t|
|00005a40| 6f 6b 65 6e 20 73 70 65 | 6c 6c 65 64 20 77 69 74 |oken spe|lled wit|
|00005a50| 68 20 25 3a 20 61 6e 64 | 20 77 68 69 74 65 20 73 |h %: and| white s|
|00005a60| 70 61 63 65 20 2a 2f 0a | 7d 3b 0a 0a 2f 2a 20 53 |pace */.|};../* S|
|00005a70| 74 72 75 63 74 75 72 65 | 20 61 6c 6c 6f 63 61 74 |tructure| allocat|
|00005a80| 65 64 20 66 6f 72 20 65 | 76 65 72 79 20 23 64 65 |ed for e|very #de|
|00005a90| 66 69 6e 65 2e 20 20 46 | 6f 72 20 61 20 73 69 6d |fine. F|or a sim|
|00005aa0| 70 6c 65 20 72 65 70 6c | 61 63 65 6d 65 6e 74 0a |ple repl|acement.|
|00005ab0| 20 20 20 73 75 63 68 20 | 61 73 0a 20 20 20 09 23 | such |as. .#|
|00005ac0| 64 65 66 69 6e 65 20 66 | 6f 6f 20 62 61 72 20 2c |define f|oo bar ,|
|00005ad0| 0a 20 20 20 6e 61 72 67 | 73 20 3d 20 2d 31 2c 20 |. narg|s = -1, |
|00005ae0| 74 68 65 20 60 70 61 74 | 74 65 72 6e 27 20 6c 69 |the `pat|tern' li|
|00005af0| 73 74 20 69 73 20 6e 75 | 6c 6c 2c 20 61 6e 64 20 |st is nu|ll, and |
|00005b00| 74 68 65 20 65 78 70 61 | 6e 73 69 6f 6e 20 69 73 |the expa|nsion is|
|00005b10| 20 6a 75 73 74 0a 20 20 | 20 74 68 65 20 72 65 70 | just. | the rep|
|00005b20| 6c 61 63 65 6d 65 6e 74 | 20 74 65 78 74 2e 20 20 |lacement| text. |
|00005b30| 4e 61 72 67 73 20 3d 20 | 30 20 6d 65 61 6e 73 20 |Nargs = |0 means |
|00005b40| 61 20 66 75 6e 63 74 69 | 6f 6e 6c 69 6b 65 20 6d |a functi|onlike m|
|00005b50| 61 63 72 6f 20 77 69 74 | 68 20 6e 6f 20 61 72 67 |acro wit|h no arg|
|00005b60| 73 2c 0a 20 20 20 65 2e | 67 2e 2c 0a 20 20 20 20 |s,. e.|g.,. |
|00005b70| 20 20 20 23 64 65 66 69 | 6e 65 20 67 65 74 63 68 | #defi|ne getch|
|00005b80| 61 72 28 29 20 67 65 74 | 63 20 28 73 74 64 69 6e |ar() get|c (stdin|
|00005b90| 29 20 2e 0a 20 20 20 57 | 68 65 6e 20 74 68 65 72 |) .. W|hen ther|
|00005ba0| 65 20 61 72 65 20 61 72 | 67 73 2c 20 74 68 65 20 |e are ar|gs, the |
|00005bb0| 65 78 70 61 6e 73 69 6f | 6e 20 69 73 20 74 68 65 |expansio|n is the|
|00005bc0| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 74 65 78 | replace|ment tex|
|00005bd0| 74 20 77 69 74 68 20 74 | 68 65 0a 20 20 20 61 72 |t with t|he. ar|
|00005be0| 67 73 20 73 71 75 61 73 | 68 65 64 20 6f 75 74 2c |gs squas|hed out,|
|00005bf0| 20 61 6e 64 20 74 68 65 | 20 72 65 66 6c 69 73 74 | and the| reflist|
|00005c00| 20 69 73 20 61 20 6c 69 | 73 74 20 64 65 73 63 72 | is a li|st descr|
|00005c10| 69 62 69 6e 67 20 68 6f | 77 20 74 6f 0a 20 20 20 |ibing ho|w to. |
|00005c20| 62 75 69 6c 64 20 74 68 | 65 20 6f 75 74 70 75 74 |build th|e output|
|00005c30| 20 66 72 6f 6d 20 74 68 | 65 20 69 6e 70 75 74 3a | from th|e input:|
|00005c40| 20 65 2e 67 2e 2c 20 22 | 33 20 63 68 61 72 73 2c | e.g., "|3 chars,|
|00005c50| 20 74 68 65 6e 20 74 68 | 65 20 31 73 74 20 61 72 | then th|e 1st ar|
|00005c60| 67 2c 0a 20 20 20 74 68 | 65 6e 20 39 20 63 68 61 |g,. th|en 9 cha|
|00005c70| 72 73 2c 20 74 68 65 6e | 20 74 68 65 20 33 72 64 |rs, then| the 3rd|
|00005c80| 20 61 72 67 2c 20 74 68 | 65 6e 20 30 20 63 68 61 | arg, th|en 0 cha|
|00005c90| 72 73 2c 20 74 68 65 6e | 20 74 68 65 20 32 6e 64 |rs, then| the 2nd|
|00005ca0| 20 61 72 67 22 2e 0a 20 | 20 20 54 68 65 20 63 68 | arg".. | The ch|
|00005cb0| 61 72 73 20 68 65 72 65 | 20 63 6f 6d 65 20 66 72 |ars here| come fr|
|00005cc0| 6f 6d 20 74 68 65 20 65 | 78 70 61 6e 73 69 6f 6e |om the e|xpansion|
|00005cd0| 2e 20 20 57 68 61 74 65 | 76 65 72 20 69 73 20 6c |. Whate|ver is l|
|00005ce0| 65 66 74 20 6f 66 20 74 | 68 65 0a 20 20 20 65 78 |eft of t|he. ex|
|00005cf0| 70 61 6e 73 69 6f 6e 20 | 61 66 74 65 72 20 74 68 |pansion |after th|
|00005d00| 65 20 6c 61 73 74 20 61 | 72 67 2d 6f 63 63 75 72 |e last a|rg-occur|
|00005d10| 72 65 6e 63 65 20 69 73 | 20 63 6f 70 69 65 64 20 |rence is| copied |
|00005d20| 61 66 74 65 72 20 74 68 | 61 74 20 61 72 67 2e 0a |after th|at arg..|
|00005d30| 20 20 20 4e 6f 74 65 20 | 74 68 61 74 20 74 68 65 | Note |that the|
|00005d40| 20 72 65 66 6c 69 73 74 | 20 63 61 6e 20 62 65 20 | reflist| can be |
|00005d50| 61 72 62 69 74 72 61 72 | 69 6c 79 20 6c 6f 6e 67 |arbitrar|ily long|
|00005d60| 2d 2d 2d 0a 20 20 20 69 | 74 73 20 6c 65 6e 67 74 |---. i|ts lengt|
|00005d70| 68 20 64 65 70 65 6e 64 | 73 20 6f 6e 20 74 68 65 |h depend|s on the|
|00005d80| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 69 6d 65 73 | number |of times|
|00005d90| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 61 | the arg|uments a|
|00005da0| 70 70 65 61 72 20 69 6e | 0a 20 20 20 74 68 65 20 |ppear in|. the |
|00005db0| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 74 65 78 74 |replacem|ent text|
|00005dc0| 2c 20 6e 6f 74 20 68 6f | 77 20 6d 61 6e 79 20 61 |, not ho|w many a|
|00005dd0| 72 67 73 20 74 68 65 72 | 65 20 61 72 65 2e 20 20 |rgs ther|e are. |
|00005de0| 45 78 61 6d 70 6c 65 3a | 0a 20 20 20 23 64 65 66 |Example:|. #def|
|00005df0| 69 6e 65 20 66 28 78 29 | 20 78 2b 78 2b 78 2b 78 |ine f(x)| x+x+x+x|
|00005e00| 2b 78 2b 78 2b 78 20 77 | 6f 75 6c 64 20 68 61 76 |+x+x+x w|ould hav|
|00005e10| 65 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 74 65 |e replac|ement te|
|00005e20| 78 74 20 22 2b 2b 2b 2b | 2b 2b 22 20 61 6e 64 0a |xt "++++|++" and.|
|00005e30| 20 20 20 70 61 74 74 65 | 72 6e 20 6c 69 73 74 0a | patte|rn list.|
|00005e40| 20 20 20 20 20 7b 20 28 | 30 2c 20 31 29 2c 20 28 | { (|0, 1), (|
|00005e50| 31 2c 20 31 29 2c 20 28 | 31 2c 20 31 29 2c 20 2e |1, 1), (|1, 1), .|
|00005e60| 2e 2e 2c 20 28 31 2c 20 | 31 29 2c 20 4e 55 4c 4c |.., (1, |1), NULL|
|00005e70| 20 7d 0a 20 20 20 77 68 | 65 72 65 20 28 78 2c 20 | }. wh|ere (x, |
|00005e80| 79 29 20 6d 65 61 6e 73 | 20 28 6e 63 68 61 72 73 |y) means| (nchars|
|00005e90| 2c 20 61 72 67 6e 6f 29 | 2e 20 2a 2f 0a 0a 74 79 |, argno)|. */..ty|
|00005ea0| 70 65 64 65 66 20 73 74 | 72 75 63 74 20 64 65 66 |pedef st|ruct def|
|00005eb0| 69 6e 69 74 69 6f 6e 20 | 44 45 46 49 4e 49 54 49 |inition |DEFINITI|
|00005ec0| 4f 4e 3b 0a 73 74 72 75 | 63 74 20 64 65 66 69 6e |ON;.stru|ct defin|
|00005ed0| 69 74 69 6f 6e 20 7b 0a | 20 20 69 6e 74 20 6e 61 |ition {.| int na|
|00005ee0| 72 67 73 3b 0a 20 20 69 | 6e 74 20 6c 65 6e 67 74 |rgs;. i|nt lengt|
|00005ef0| 68 3b 09 09 09 2f 2a 20 | 6c 65 6e 67 74 68 20 6f |h;.../* |length o|
|00005f00| 66 20 65 78 70 61 6e 73 | 69 6f 6e 20 73 74 72 69 |f expans|ion stri|
|00005f10| 6e 67 20 2a 2f 0a 20 20 | 69 6e 74 20 70 72 65 64 |ng */. |int pred|
|00005f20| 65 66 69 6e 65 64 3b 09 | 09 2f 2a 20 54 72 75 65 |efined;.|./* True|
|00005f30| 20 69 66 20 74 68 65 20 | 6d 61 63 72 6f 20 77 61 | if the |macro wa|
|00005f40| 73 20 62 75 69 6c 74 69 | 6e 20 6f 72 20 2a 2f 0a |s builti|n or */.|
|00005f50| 09 09 09 09 2f 2a 20 63 | 61 6d 65 20 66 72 6f 6d |..../* c|ame from|
|00005f60| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 6c 69 6e | the com|mand lin|
|00005f70| 65 20 2a 2f 0a 20 20 55 | 5f 43 48 41 52 20 2a 65 |e */. U|_CHAR *e|
|00005f80| 78 70 61 6e 73 69 6f 6e | 3b 0a 20 20 69 6e 74 20 |xpansion|;. int |
|00005f90| 6c 69 6e 65 3b 09 09 09 | 2f 2a 20 4c 69 6e 65 20 |line;...|/* Line |
|00005fa0| 6e 75 6d 62 65 72 20 6f | 66 20 64 65 66 69 6e 69 |number o|f defini|
|00005fb0| 74 69 6f 6e 20 2a 2f 0a | 20 20 63 68 61 72 20 2a |tion */.| char *|
|00005fc0| 66 69 6c 65 3b 09 09 09 | 2f 2a 20 46 69 6c 65 20 |file;...|/* File |
|00005fd0| 6f 66 20 64 65 66 69 6e | 69 74 69 6f 6e 20 2a 2f |of defin|ition */|
|00005fe0| 0a 20 20 63 68 61 72 20 | 72 65 73 74 5f 61 72 67 |. char |rest_arg|
|00005ff0| 73 3b 09 09 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 69 |s;../* N|onzero i|
|00006000| 66 20 6c 61 73 74 20 61 | 72 67 2e 20 61 62 73 6f |f last a|rg. abso|
|00006010| 72 62 73 20 74 68 65 20 | 72 65 73 74 20 2a 2f 0a |rbs the |rest */.|
|00006020| 20 20 73 74 72 75 63 74 | 20 72 65 66 6c 69 73 74 | struct| reflist|
|00006030| 20 7b 0a 20 20 20 20 73 | 74 72 75 63 74 20 72 65 | {. s|truct re|
|00006040| 66 6c 69 73 74 20 2a 6e | 65 78 74 3b 0a 0a 20 20 |flist *n|ext;.. |
|00006050| 20 20 65 6e 75 6d 20 73 | 68 61 72 70 5f 74 6f 6b | enum s|harp_tok|
|00006060| 65 6e 5f 74 79 70 65 20 | 73 74 72 69 6e 67 69 66 |en_type |stringif|
|00006070| 79 3b 09 2f 2a 20 73 65 | 74 20 69 66 20 61 20 23 |y;./* se|t if a #|
|00006080| 20 6f 70 65 72 61 74 6f | 72 20 62 65 66 6f 72 65 | operato|r before|
|00006090| 20 61 72 67 20 2a 2f 0a | 20 20 20 20 65 6e 75 6d | arg */.| enum|
|000060a0| 20 73 68 61 72 70 5f 74 | 6f 6b 65 6e 5f 74 79 70 | sharp_t|oken_typ|
|000060b0| 65 20 72 61 77 5f 62 65 | 66 6f 72 65 3b 09 2f 2a |e raw_be|fore;./*|
|000060c0| 20 73 65 74 20 69 66 20 | 61 20 23 23 20 6f 70 65 | set if |a ## ope|
|000060d0| 72 61 74 6f 72 20 62 65 | 66 6f 72 65 20 61 72 67 |rator be|fore arg|
|000060e0| 20 2a 2f 0a 20 20 20 20 | 65 6e 75 6d 20 73 68 61 | */. |enum sha|
|000060f0| 72 70 5f 74 6f 6b 65 6e | 5f 74 79 70 65 20 72 61 |rp_token|_type ra|
|00006100| 77 5f 61 66 74 65 72 3b | 09 2f 2a 20 73 65 74 20 |w_after;|./* set |
|00006110| 69 66 20 61 20 23 23 20 | 6f 70 65 72 61 74 6f 72 |if a ## |operator|
|00006120| 20 61 66 74 65 72 20 61 | 72 67 20 2a 2f 0a 0a 20 | after a|rg */.. |
|00006130| 20 20 20 63 68 61 72 20 | 72 65 73 74 5f 61 72 67 | char |rest_arg|
|00006140| 73 3b 09 09 2f 2a 20 4e | 6f 6e 7a 65 72 6f 20 69 |s;../* N|onzero i|
|00006150| 66 20 74 68 69 73 20 61 | 72 67 2e 20 61 62 73 6f |f this a|rg. abso|
|00006160| 72 62 73 20 74 68 65 20 | 72 65 73 74 20 2a 2f 0a |rbs the |rest */.|
|00006170| 20 20 20 20 69 6e 74 20 | 6e 63 68 61 72 73 3b 09 | int |nchars;.|
|00006180| 09 09 2f 2a 20 4e 75 6d | 62 65 72 20 6f 66 20 6c |../* Num|ber of l|
|00006190| 69 74 65 72 61 6c 20 63 | 68 61 72 73 20 74 6f 20 |iteral c|hars to |
|000061a0| 63 6f 70 79 20 62 65 66 | 6f 72 65 0a 09 09 09 09 |copy bef|ore.....|
|000061b0| 20 20 20 74 68 69 73 20 | 61 72 67 20 6f 63 63 75 | this |arg occu|
|000061c0| 72 72 65 6e 63 65 2e 20 | 20 2a 2f 0a 20 20 20 20 |rrence. | */. |
|000061d0| 69 6e 74 20 61 72 67 6e | 6f 3b 09 09 09 2f 2a 20 |int argn|o;.../* |
|000061e0| 4e 75 6d 62 65 72 20 6f | 66 20 61 72 67 20 74 6f |Number o|f arg to|
|000061f0| 20 73 75 62 73 74 69 74 | 75 74 65 20 28 6f 72 69 | substit|ute (ori|
|00006200| 67 69 6e 2d 30 29 20 2a | 2f 0a 20 20 7d 20 2a 70 |gin-0) *|/. } *p|
|00006210| 61 74 74 65 72 6e 3b 0a | 20 20 75 6e 69 6f 6e 20 |attern;.| union |
|00006220| 7b 0a 20 20 20 20 2f 2a | 20 4e 61 6d 65 73 20 6f |{. /*| Names o|
|00006230| 66 20 6d 61 63 72 6f 20 | 61 72 67 73 2c 20 63 6f |f macro |args, co|
|00006240| 6e 63 61 74 65 6e 61 74 | 65 64 20 69 6e 20 72 65 |ncatenat|ed in re|
|00006250| 76 65 72 73 65 20 6f 72 | 64 65 72 0a 20 20 20 20 |verse or|der. |
|00006260| 20 20 20 77 69 74 68 20 | 63 6f 6d 6d 61 2d 73 70 | with |comma-sp|
|00006270| 61 63 65 20 62 65 74 77 | 65 65 6e 20 74 68 65 6d |ace betw|een them|
|00006280| 2e 0a 20 20 20 20 20 20 | 20 54 68 65 20 6f 6e 6c |.. | The onl|
|00006290| 79 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 69 73 |y use of| this is|
|000062a0| 20 74 68 61 74 20 77 65 | 20 77 61 72 6e 20 6f 6e | that we| warn on|
|000062b0| 20 72 65 64 65 66 69 6e | 69 74 69 6f 6e 0a 20 20 | redefin|ition. |
|000062c0| 20 20 20 20 20 69 66 20 | 74 68 69 73 20 64 69 66 | if |this dif|
|000062d0| 66 65 72 73 20 62 65 74 | 77 65 65 6e 20 74 68 65 |fers bet|ween the|
|000062e0| 20 6f 6c 64 20 61 6e 64 | 20 6e 65 77 20 64 65 66 | old and| new def|
|000062f0| 69 6e 69 74 69 6f 6e 73 | 2e 20 20 2a 2f 0a 20 20 |initions|. */. |
|00006300| 20 20 55 5f 43 48 41 52 | 20 2a 61 72 67 6e 61 6d | U_CHAR| *argnam|
|00006310| 65 73 3b 0a 20 20 7d 20 | 61 72 67 73 3b 0a 7d 3b |es;. } |args;.};|
|00006320| 0a 0a 2f 2a 20 64 69 66 | 66 65 72 65 6e 74 20 6b |../* dif|ferent k|
|00006330| 69 6e 64 73 20 6f 66 20 | 74 68 69 6e 67 73 20 74 |inds of |things t|
|00006340| 68 61 74 20 63 61 6e 20 | 61 70 70 65 61 72 20 69 |hat can |appear i|
|00006350| 6e 20 74 68 65 20 76 61 | 6c 75 65 20 66 69 65 6c |n the va|lue fiel|
|00006360| 64 0a 20 20 20 6f 66 20 | 61 20 68 61 73 68 20 6e |d. of |a hash n|
|00006370| 6f 64 65 2e 20 20 41 63 | 74 75 61 6c 6c 79 2c 20 |ode. Ac|tually, |
|00006380| 74 68 69 73 20 6d 61 79 | 20 62 65 20 75 73 65 6c |this may| be usel|
|00006390| 65 73 73 20 6e 6f 77 2e | 20 2a 2f 0a 75 6e 69 6f |ess now.| */.unio|
|000063a0| 6e 20 68 61 73 68 76 61 | 6c 20 7b 0a 20 20 63 68 |n hashva|l {. ch|
|000063b0| 61 72 20 2a 63 70 76 61 | 6c 3b 0a 20 20 44 45 46 |ar *cpva|l;. DEF|
|000063c0| 49 4e 49 54 49 4f 4e 20 | 2a 64 65 66 6e 3b 0a 20 |INITION |*defn;. |
|000063d0| 20 4b 45 59 44 45 46 20 | 2a 6b 65 79 64 65 66 3b | KEYDEF |*keydef;|
|000063e0| 0a 7d 3b 0a 0a 2f 2a 0a | 20 2a 20 73 70 65 63 69 |.};../*.| * speci|
|000063f0| 61 6c 20 65 78 74 65 6e | 73 69 6f 6e 20 73 74 72 |al exten|sion str|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.